diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2011-02-04 22:47:55 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2011-02-04 22:47:55 +0000 |
commit | 3835f47c7e144fc73123f5d5706c6ec666cf3ae4 (patch) | |
tree | 88fab75180accb5d4fe09924cbd01e047b9e4903 /bin/sh/main.c | |
parent | 9f2e8bdff315385f44af49b71b667cd09d480f84 (diff) | |
download | src-test2-3835f47c7e144fc73123f5d5706c6ec666cf3ae4.tar.gz src-test2-3835f47c7e144fc73123f5d5706c6ec666cf3ae4.zip |
Notes
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r-- | bin/sh/main.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c index 88483b03d952..c5de8990a2e1 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -98,19 +98,7 @@ main(int argc, char *argv[]) (void) setlocale(LC_ALL, ""); state = 0; if (setjmp(main_handler.loc)) { - /* - * When a shell procedure is executed, we raise the - * exception EXSHELLPROC to clean up before executing - * the shell procedure. - */ switch (exception) { - case EXSHELLPROC: - rootpid = getpid(); - rootshell = 1; - minusc = NULL; - state = 3; - break; - case EXEXEC: exitstatus = exerrno; break; @@ -123,10 +111,8 @@ main(int argc, char *argv[]) break; } - if (exception != EXSHELLPROC) { - if (state == 0 || iflag == 0 || ! rootshell) - exitshell(exitstatus); - } + if (state == 0 || iflag == 0 || ! rootshell) + exitshell(exitstatus); reset(); if (exception == EXINT) out2fmt_flush("\n"); |