Skip to content

Commit e61dfbe

Browse files
committed
Add a known issues section for #8.
1 parent 9f230d5 commit e61dfbe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,24 @@ What happens when you actually connect to the socket
116116
3. Stacktraces for each thread are written to the UDS
117117
4. REPL is started so you can fiddle with the process
118118

119+
Known issues
120+
============
121+
122+
SIGTERM and socket cleanup
123+
--------------------------
124+
125+
By default Python doesn't call the ``atexit`` callbacks with the default SIGTERM handling. This makes manhole leave stray
126+
socket files around. If this is undesirable you should install a custom SIGTERM handler so ``atexit`` is properly invoked.
127+
Example::
128+
129+
import signal
130+
import sys
131+
132+
def handle_sigterm(signo, frame):
133+
sys.exit(128 + signo) # this will raise SystemExit and cause atexit to be called
134+
135+
signal.signal(signal.SIGTERM, handle_sigterm)
136+
119137
Requirements
120138
============
121139

0 commit comments

Comments
 (0)