Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2
sysvinit
sysvinit-2.86-race.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sysvinit-2.86-race.patch of Package sysvinit
--- src/init.c +++ src/init.c 2005-10-19 12:01:15.000000000 +0200 @@ -20,6 +20,14 @@ * */ +/* + * 4 Sep 2001, Andrea Arcangeli: + * Fix a race in spawn() that is used to deadlock init in a + * waitpid() loop: must set the childhandler as default before forking + * off the child or the chld_handler could run before the waitpid loop + * has a chance to find its zombie-child. + */ + #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> @@ -966,6 +974,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 +987,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)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor