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

Avoid using non-portable <err.h>.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1784 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ad149977
......@@ -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));
......
......@@ -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"
......
......@@ -37,7 +37,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <err.h>
#include <errno.h>
#ifndef HAVE_STRLCPY
......
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