소스 검색

More accurate check of file descriptors

Alexander Smirnov 11 년 전
부모
커밋
fbe90ac07b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      celery/platforms.py

+ 1 - 1
celery/platforms.py

@@ -292,7 +292,7 @@ class DaemonContext(object):
         self.stdfds = (sys.stdin, sys.stdout, sys.stderr)
 
     def redirect_to_null(self, fd):
-        if fd:
+        if fd is not None:
             dest = os.open(os.devnull, os.O_RDWR)
             os.dup2(dest, fd)