Reset SIGTSTP handler to default both for parent and child process.
Submitted by: bde
This commit is contained in:
parent
7808f3fb4f
commit
59af771a3e
@ -131,7 +131,7 @@ main(int argc, char *argv[])
|
||||
char *username, *cleanenv, *class, shellbuf[MAXPATHLEN];
|
||||
const char *p, *user, *shell, *mytty, **nargv;
|
||||
|
||||
struct sigaction sa, sa_int, sa_quit, sa_tstp;
|
||||
struct sigaction sa, sa_int, sa_quit;
|
||||
|
||||
shell = class = cleanenv = NULL;
|
||||
asme = asthem = fastlogin = statusp = 0;
|
||||
@ -327,6 +327,8 @@ main(int argc, char *argv[])
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGINT, &sa, &sa_int);
|
||||
sigaction(SIGQUIT, &sa, &sa_quit);
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigaction(SIGTSTP, &sa, NULL);
|
||||
|
||||
statusp = 1;
|
||||
child_pid = fork();
|
||||
@ -356,7 +358,6 @@ main(int argc, char *argv[])
|
||||
case 0:
|
||||
sigaction(SIGINT, &sa_int, NULL);
|
||||
sigaction(SIGQUIT, &sa_quit, NULL);
|
||||
sigaction(SIGTSTP, &sa_tstp, NULL);
|
||||
/*
|
||||
* Set all user context except for: Environmental variables
|
||||
* Umask Login records (wtmp, etc) Path
|
||||
|
Loading…
Reference in New Issue
Block a user