Skip to content

Commit 3c104c7

Browse files
Matthew Farrelleeaarondav
authored andcommitted
[SPARK-1394] Remove SIGCHLD handler in worker subprocess
It should not be the responsibility of the worker subprocess, which does not intentionally fork, to try and cleanup child processes. Doing so is complex and interferes with operations such as platform.system(). If it is desirable to have tighter control over subprocesses, then namespaces should be used and it should be the manager's resposibility to handle cleanup. Author: Matthew Farrellee <[email protected]> Closes apache#1247 from mattf/SPARK-1394 and squashes the following commits: c36f308 [Matthew Farrellee] [SPARK-1394] Remove SIGCHLD handler in worker subprocess
1 parent b8f2e13 commit 3c104c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/pyspark/daemon.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def waitSocketClose(sock):
103103
if os.fork() == 0:
104104
# Leave the worker pool
105105
signal.signal(SIGHUP, SIG_DFL)
106+
signal.signal(SIGCHLD, SIG_DFL)
106107
listen_sock.close()
107108
# Read the socket using fdopen instead of socket.makefile() because the latter
108109
# seems to be very slow; note that we need to dup() the file descriptor because

0 commit comments

Comments
 (0)