Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
cron
vixie-cron-4.1-vfork_sigchld.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File vixie-cron-4.1-vfork_sigchld.diff of Package cron
--- vixie-cron-4.1/do_command.c +++ vixie-cron-4.1/do_command.c @@ -136,13 +136,13 @@ /* fork again, this time so we can exec the user's command. */ - switch (vfork()) { + switch (fork()) { case -1: - log_it("CRON", getpid(), "error", "can't vfork"); + log_it("CRON", getpid(), "error", "can't fork"); exit(ERROR_EXIT); /*NOTREACHED*/ case 0: - Debug(DPROC, ("[%ld] grandchild process vfork()'ed\n", + Debug(DPROC, ("[%ld] grandchild process fork()'ed\n", (long)getpid())) /* write a log message. we've waited this long to do it @@ -187,6 +187,13 @@ } dup2(STDOUT, STDERR); + /* Our grandparent is watching for our parent's death by + * catching SIGCHLD. Meanwhile, our parent will use wait + * explicitly and so has disabled SIGCHLD. So now it's + * time to reset SIGCHLD handling. + */ + (void) signal(SIGCHLD, SIG_DFL); + /* set our directory, uid and gid. Set gid first, since once * we set uid, we've lost root privledges. */ --- vixie-cron-4.1/popen.c +++ vixie-cron-4.1/popen.c @@ -84,7 +84,7 @@ break; argv[MAX_ARGV-1] = NULL; - switch (pid = vfork()) { + switch (pid = fork()) { case -1: /* error */ (void)close(pdes[0]); (void)close(pdes[1]);
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