r2224 - trunk/varnish-cache/lib/libvarnishcompat
des at projects.linpro.no
des at projects.linpro.no
Thu Nov 1 22:52:34 CET 2007
Author: des
Date: 2007-11-01 22:52:34 +0100 (Thu, 01 Nov 2007)
New Revision: 2224
Modified:
trunk/varnish-cache/lib/libvarnishcompat/daemon.c
Log:
Don't rely on non-portable <paths.h>
Modified: trunk/varnish-cache/lib/libvarnishcompat/daemon.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishcompat/daemon.c 2007-11-01 21:48:54 UTC (rev 2223)
+++ trunk/varnish-cache/lib/libvarnishcompat/daemon.c 2007-11-01 21:52:34 UTC (rev 2224)
@@ -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 @@
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);
More information about the varnish-commit
mailing list