diff options
author | jilles <jilles@FreeBSD.org> | 2009-12-25 20:21:35 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-12-25 20:21:35 +0000 |
commit | 545cc5fec7115d450d5b76c2f598d1eafb16d592 (patch) | |
tree | 70cc7efa48eb3f1089f61e3030e19359262db521 /bin/sh/main.h | |
parent | 2f4287b1338caa52535b49c6af74ecf62ecdb8ed (diff) | |
download | FreeBSD-src-545cc5fec7115d450d5b76c2f598d1eafb16d592.zip FreeBSD-src-545cc5fec7115d450d5b76c2f598d1eafb16d592.tar.gz |
sh: Do not run callers' exception handlers in subshells.
Reset the exception handler in the child to main's.
This avoids inappropriate double cleanups or shell duplication when the
exception is caught, such as 'fc' and future 'command eval' and 'command .'.
Diffstat (limited to 'bin/sh/main.h')
-rw-r--r-- | bin/sh/main.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sh/main.h b/bin/sh/main.h index b6dadc3..c5e8bfd3 100644 --- a/bin/sh/main.h +++ b/bin/sh/main.h @@ -35,6 +35,7 @@ extern int rootpid; /* pid of main shell */ extern int rootshell; /* true if we aren't a child of the main shell */ +extern struct jmploc main_handler; /* top level exception handler */ void readcmdfile(const char *); void cmdloop(int); |