浏览代码

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)