ack. On 04/12/2010 07:09 PM, Peter Jones wrote:
If we wait only on udevd's pid, it means we've got zombie processes hanging out. So instead, wait on all pids, and then only do the udevd stuff if we actually see udevd exit. --- loader/init.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loader/init.c b/loader/init.c index a2095de..1a38df3 100644 --- a/loader/init.c +++ b/loader/init.c @@ -503,7 +503,7 @@ int main(int argc, char **argv) { pid_t retpid; int waitstatus; - retpid = waitpid(childpid,&waitstatus, 0); + retpid = wait(&waitstatus); if (retpid == -1) { if (errno == EINTR) continue; @@ -514,7 +514,7 @@ int main(int argc, char **argv) { break; printf("init: error waiting on udevd: %m\n"); exit(1); - } else if (WIFEXITED(waitstatus)) { + } else if ((retpid == childpid)&& WIFEXITED(waitstatus)) { break; } } while (1); @@ -768,7 +768,7 @@ int main(int argc, char **argv) { while (!doShutdown) { pid_t childpid; - childpid = waitpid(-1,&waitStatus, 0); + childpid = wait(&waitStatus); if (childpid == installpid) { doShutdown = 1;
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list