Browse Source

More accurate check of file descriptors

Alexander Smirnov 11 years ago
parent
commit
607299d8f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/platforms.py

+ 1 - 1
celery/platforms.py

@@ -301,7 +301,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)