Explorar el Código

daemonize(): use os.devnull instead of hardcoded /dev/null

Carlo Teubner hace 9 años
padre
commit
13761c4ec2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/borg/helpers.py

+ 1 - 1
src/borg/helpers.py

@@ -1001,7 +1001,7 @@ def daemonize():
     os.close(0)
     os.close(1)
     os.close(2)
-    fd = os.open('/dev/null', os.O_RDWR)
+    fd = os.open(os.devnull, os.O_RDWR)
     os.dup2(fd, 0)
     os.dup2(fd, 1)
     os.dup2(fd, 2)