HyukjinKwon commented on a change in pull request #25315: 
[SPARK-28582][PYSPARK] Fix pyspark daemon exit failed when receive SIGTERM on 
Python 3.7
URL: https://github.com/apache/spark/pull/25315#discussion_r309483166
 
 

 ##########
 File path: python/pyspark/daemon.py
 ##########
 @@ -102,7 +102,7 @@ def shutdown(code):
         signal.signal(SIGTERM, SIG_DFL)
         # Send SIGHUP to notify workers of shutdown
         os.kill(0, SIGHUP)
 
 Review comment:
   They are different because here it should guarantee to let their child die 
(forked workers). Other two occurrences of it is just to the single forked 
worker to die so cleanup procedure is not critical there.
   
   `os._exit()` call itself does not guarantee those cleanups as pointed out 
and [as documented](https://docs.python.org/3/library/os.html#os._exit).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to