#! /bin/sh /usr/share/dpatch/dpatch-run ## 60_init_race.dpatch by Petter Reinholdtsen ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Avoid race condition when starting programs during boot. Patch ## DP: found in SuSe. Fixes bug #327612. @DPATCH@ Index: sysvinit/src/init.c =================================================================== --- sysvinit/src/init.c (revisjon 62) +++ sysvinit/src/init.c (arbeidskopi) @@ -966,6 +966,7 @@ dup(f); dup(f); } + SETSIG(sa, SIGCHLD, SIG_DFL, SA_RESTART); if ((pid = fork()) < 0) { initlog(L_VB, "cannot fork"); exit(1); @@ -978,7 +979,6 @@ SETSIG(sa, SIGINT, SIG_IGN, SA_RESTART); SETSIG(sa, SIGTSTP, SIG_IGN, SA_RESTART); SETSIG(sa, SIGQUIT, SIG_IGN, SA_RESTART); - SETSIG(sa, SIGCHLD, SIG_DFL, SA_RESTART); while ((rc = waitpid(pid, &st, 0)) != pid) if (rc < 0 && errno == ECHILD)