diff options
Diffstat (limited to 'lib/libc/gen/daemon.c')
-rw-r--r-- | lib/libc/gen/daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/daemon.c b/lib/libc/gen/daemon.c index 79f426473cf..b84cb4fb8e4 100644 --- a/lib/libc/gen/daemon.c +++ b/lib/libc/gen/daemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: daemon.c,v 1.7 2010/07/27 22:29:09 marco Exp $ */ +/* $OpenBSD: daemon.c,v 1.8 2021/10/24 21:24:20 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -53,7 +53,7 @@ daemon(int nochdir, int noclose) if (!nochdir) (void)chdir("/"); - if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { + if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR)) != -1) { (void)dup2(fd, STDIN_FILENO); (void)dup2(fd, STDOUT_FILENO); (void)dup2(fd, STDERR_FILENO); |