You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, supervisord sends SIGTERM to processes to quit them, as stated in this issue.
Sending this signal, if I wouldn't remove the pending sockets, they prevent bjoern from starting next time, because the old socket is assumed to be in use.
I saw there is code for unlinking sockets in bjoern, but it is appearantly bypassed when receiving SIGTERM. Is there any way to make shutdown of bjoern more safe?
OS: Debian 8, Python 2.7.9
The text was updated successfully, but these errors were encountered:
I am having trouble replicating the issue, but I have implemented an atexit handler for tearing down the server socket in #155. Could someone verify that this fixes the issue?
I think that your fix will not be working. I've tried to make a simple wrapper that just unlinks the socket with the help of atexit, and it wasn't called. I think that the reason is mentioned there:
Note: The functions registered via this module are not called when the program is killed by a signal not handled by Python, when a Python fatal internal error is detected, or when os._exit() is called.
So, the signal seems to be a better option (see #91). Bud even with the signals, it seems that there should be a manual unlink before the run.
I'm running Bjoern embedded in Python in this way:
By default, supervisord sends SIGTERM to processes to quit them, as stated in this issue.
Sending this signal, if I wouldn't remove the pending sockets, they prevent bjoern from starting next time, because the old socket is assumed to be in use.
I saw there is code for unlinking sockets in bjoern, but it is appearantly bypassed when receiving SIGTERM. Is there any way to make shutdown of bjoern more safe?
OS: Debian 8, Python 2.7.9
The text was updated successfully, but these errors were encountered: