]> err.no Git - varnish/commitdiff
Avoid using non-portable <err.h>.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 30 Jul 2007 09:49:05 +0000 (09:49 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 30 Jul 2007 09:49:05 +0000 (09:49 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1784 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/mgt_child.c
varnish-cache/bin/varnishd/varnishd.c
varnish-cache/lib/libvarnish/vpf.c

index 75900d15eb787035c9bd5e49d9eb76215c1c7703..67fc75dcc1839c015d74cff289709b28d849361f 100644 (file)
@@ -42,8 +42,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#include <err.h>               /* XXX */
-
 #ifndef HAVE_SETPROCTITLE
 #include "compat/setproctitle.h"
 #endif
@@ -188,8 +186,10 @@ start_child(void)
        AZ(pipe(child_fds));
        MCF_ParamSync();
        i = fork();
-       if (i < 0)
-               errx(1, "Could not fork child");
+       if (i < 0) {
+               perror("Could not fork child");
+               exit(1);
+       }
        if (i == 0) {
                if (geteuid() == 0) {
                        XXXAZ(setgid(params->gid));
index 343478a71cc408e28340ccb7d76494e138b5d8e7..2ef32de254c4470bc26d2e5ba8f10b6d7ef0ef8a 100644 (file)
@@ -31,7 +31,8 @@
  * The management process and CLI handling
  */
 
-#include <err.h>
+#include <sys/stat.h>
+
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -44,7 +45,6 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/stat.h>
 
 #ifndef HAVE_DAEMON
 #include "compat/daemon.h"
index 20f159e67a96d492e84657e5ba7a161bfee0fc56..857cc7c0b933e414118cfd8af8af01a5c375dc5d 100644 (file)
@@ -37,7 +37,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <string.h>
-#include <err.h>
 #include <errno.h>
 
 #ifndef HAVE_STRLCPY