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

pid_t is not necessarily compatible with int.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1788 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 538ce30e
......@@ -166,7 +166,7 @@ close_sockets(void)
static void
start_child(void)
{
int i;
pid_t pid;
unsigned u;
char *p;
struct ev *e;
......@@ -185,12 +185,11 @@ start_child(void)
AZ(pipe(&heritage.fds[2]));
AZ(pipe(child_fds));
MCF_ParamSync();
i = fork();
if (i < 0) {
if ((pid = fork()) < 0) {
perror("Could not fork child");
exit(1);
}
if (i == 0) {
if (pid == 0) {
if (geteuid() == 0) {
XXXAZ(setgid(params->gid));
XXXAZ(setuid(params->uid));
......@@ -217,7 +216,7 @@ start_child(void)
exit (1);
}
fprintf(stderr, "start child pid %d\n", i);
fprintf(stderr, "start child pid %jd\n", (intmax_t)pid);
AZ(close(child_fds[1]));
child_fds[1] = -1;
......
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