File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ Kyle Mulka <repalviglator@yahoo.com>
109109Lars Hansson <romabysen@gmail.com>
110110Leonardo Santagada <santagada@gmail.com>
111111Levi Gross <levi@levigross.com>
112+ licunlong <shenxiaogll@163.com>
112113Łukasz Kucharski <lkucharski@leon.pl>
113114Mahmoud Hashemi <mahmoudrhashemi@gmail.com>
114115Malthe Borch <mborch@gmail.com>
Original file line number Diff line number Diff line change @@ -486,7 +486,10 @@ def daemonize(enable_stdio_inheritance=False):
486486 closerange (0 , 3 )
487487
488488 fd_null = os .open (REDIRECT_TO , os .O_RDWR )
489+ # PEP 446, make fd for /dev/null inheritable
490+ os .set_inheritable (fd_null , True )
489491
492+ # expect fd_null to be always 0 here, but in-case not ...
490493 if fd_null != 0 :
491494 os .dup2 (fd_null , 0 )
492495
You can’t perform that action at this time.
0 commit comments