diff options
| author | David Xu <davidxu@FreeBSD.org> | 2003-03-11 09:16:51 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2003-03-11 09:16:51 +0000 |
| commit | 658d3a6bf5427b0f8c564d3c4b3889f5ecad8a74 (patch) | |
| tree | 04f52a83bf71ade61255bea2398a8d20e8a9be59 /usr.bin | |
| parent | ec8b828fc4710eff245d9101b344e37051962882 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/su/su.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index adad750dac06..3b03bb627984 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -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,7 +327,9 @@ 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(); switch (child_pid) { @@ -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 |
