1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-29 11:16:43 +00:00

Merge pull request #1510 from c4rlo/os-devnull

daemonize(): use os.devnull instead of hardcoded /dev/null
This commit is contained in:
TW 2016-08-20 11:46:03 +02:00 committed by GitHub
commit 12ea5d01cb

View file

@ -1001,7 +1001,7 @@ def daemonize():
os.close(0) os.close(0)
os.close(1) os.close(1)
os.close(2) 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, 0)
os.dup2(fd, 1) os.dup2(fd, 1)
os.dup2(fd, 2) os.dup2(fd, 2)