diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2017-04-22 21:31:37 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2017-04-22 21:31:37 +0000 |
| commit | 3be4e97d2b1d29a23b7a9998f7a124acd4e29f74 (patch) | |
| tree | 74fa0c84fc9a647d53b942533076bb2839d48b2d /bin | |
| parent | 6e5e4dbd067573f359f99d5f475a2567f00c2f8d (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/sh/options.c | 2 | ||||
| -rw-r--r-- | bin/sh/trap.c | 9 | ||||
| -rw-r--r-- | bin/sh/trap.h | 2 |
3 files changed, 4 insertions, 9 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c index 56cc5e7397c8..8b501f2d1b6a 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -131,7 +131,7 @@ procargs(int argc, char **argv) void optschanged(void) { - setinteractive(iflag); + setinteractive(); #ifndef NO_HISTORY histedit(); #endif diff --git a/bin/sh/trap.c b/bin/sh/trap.c index d67030d370ac..ba643d3485df 100644 --- a/bin/sh/trap.c +++ b/bin/sh/trap.c @@ -478,19 +478,14 @@ dotrap(void) /* - * Controls whether the shell is interactive or not. + * Controls whether the shell is interactive or not based on iflag. */ void -setinteractive(int on) +setinteractive(void) { - static int is_interactive = -1; - - if (on == is_interactive) - return; setsignal(SIGINT); setsignal(SIGQUIT); setsignal(SIGTERM); - is_interactive = on; } diff --git a/bin/sh/trap.h b/bin/sh/trap.h index 8d6cb09c30ba..b9c43f336141 100644 --- a/bin/sh/trap.h +++ b/bin/sh/trap.h @@ -43,6 +43,6 @@ void ignoresig(int); int issigchldtrapped(void); void onsig(int); void dotrap(void); -void setinteractive(int); +void setinteractive(void); void exitshell(int) __dead2; void exitshell_savedstatus(void) __dead2; |
