Skip to content

Commit c36f308

Browse files
author
Matthew Farrellee
committed
[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.
1 parent 18f29b9 commit c36f308

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)