Can you try the below patch?  I've ran into this by accident but haven't
gotten around to file a PR yet.  I'm also not sure if this is relevant
to you problem, but it sure is a wait-for-something mechanism that
couldn't possibly work because it had its pipe ends switched so far.

(from pipe(2): The first descriptor connects to the read end of the pipe,
and the second connects to the write end) 

--- external/bsd/dhcp/dist/client/dhclient.c.orig
+++ external/bsd/dhcp/dist/client/dhclient.c
@@ -3701,8 +3701,8 @@ void finish_daemon (void)
        write_client_pid_file ();
 
        IGNORE_RET (chdir("/"));
-       write(pfd[0], "X", 1);
-       close(pfd[0]);
+       write(pfd[1], "X", 1);
+       close(pfd[1]);
 }
 
 void go_daemon (void)
@@ -3723,11 +3724,11 @@ void go_daemon (void)
                log_fatal ("Can't fork daemon: %m");
        else if (pid) {
                char c;
-               close(pfd[0]);
-               read(pfd[1], &c, 1);
+               close(pfd[1]);
+               read(pfd[0], &c, 1);
                exit (0);
        } else
-               close(pfd[1]);
+               close(pfd[0]);
 }
 
 void write_client_pid_file ()

Reply via email to