When setting the signal handler for SIGTSTP to the default value

in non-I/O log mode, store the old handler value for when we restore
it after resume.
This commit is contained in:
Todd C. Miller
2012-09-16 18:40:39 -04:00
parent faf112c53b
commit 885b6e7cda

View File

@@ -576,7 +576,7 @@ handle_signals(int sv[2], pid_t child, int log_io, struct command_status *cstat)
zero_bytes(&sa, sizeof(sa)); zero_bytes(&sa, sizeof(sa));
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_DFL; sa.sa_handler = SIG_DFL;
sigaction(SIGTSTP, &sa, NULL); sigaction(SIGTSTP, &sa, &osa);
} }
if (kill(getpid(), signo) != 0) if (kill(getpid(), signo) != 0)
warning("kill(%d, SIG%s)", (int)getpid(), signame); warning("kill(%d, SIG%s)", (int)getpid(), signame);