Commit cd934278 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Don't rely on non-portable <paths.h>


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2224 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 7da469df
......@@ -35,7 +35,6 @@
#include <errno.h>
#include <fcntl.h>
#include <paths.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
......@@ -79,7 +78,7 @@ daemon(int nochdir, int noclose)
if (!nochdir)
(void)chdir("/");
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
(void)dup2(fd, STDIN_FILENO);
(void)dup2(fd, STDOUT_FILENO);
(void)dup2(fd, STDERR_FILENO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment