Wire up SIGALRM handler

Set close on exec flag for child side of the socketpair
Fix signal handling when not doing I/O logging
This commit is contained in:
Todd C. Miller
2010-03-06 14:34:23 -05:00
parent d73f580f5a
commit 4e938c0074
2 changed files with 72 additions and 44 deletions

View File

@@ -689,8 +689,6 @@ exec_setup(struct command_details *details)
}
if (ISSET(details->flags, CD_SET_UMASK))
(void) umask(details->umask);
if (ISSET(details->flags, CD_SET_TIMEOUT))
alarm(details->timeout);
if (details->chroot) {
if (chroot(details->chroot) != 0 || chdir("/") != 0) {
warning("unable to change root to %s", details->chroot);