Skip to content
Snippets Groups Projects
Commit 3a119a42 authored by Jun Wu's avatar Jun Wu
Browse files

commandserver: unblock SIGCHLD

This enables the SIGCHLD handler to work properly if some buggy program
started chg server with SIGCHLD blocked.

A test of this probably requires C code, but we don't have such kind of
tests already. Since this is a simple and clear fix, I'm leaving it as
"untested" but I did a manual test and there were no longer zombie workers.

Differential Revision: https://phab.mercurial-scm.org/D1737
parent 8652ab40
No related branches found
No related tags found
No related merge requests found
......@@ -449,6 +449,8 @@
def init(self):
self._sock = socket.socket(socket.AF_UNIX)
self._servicehandler.bindsocket(self._sock, self.address)
if util.safehasattr(util, 'unblocksignal'):
util.unblocksignal(signal.SIGCHLD)
o = signal.signal(signal.SIGCHLD, self._sigchldhandler)
self._oldsigchldhandler = o
self._socketunlinked = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment