diff options
author | adam <adam@FreeBSD.org> | 1996-09-08 03:12:22 +0000 |
---|---|---|
committer | adam <adam@FreeBSD.org> | 1996-09-08 03:12:22 +0000 |
commit | 84c0874422f917c2b421d969c3519b7960c7233b (patch) | |
tree | bb3848fdc30a94373a3d291596281718df57d8f4 /bin | |
parent | c748892b58149f5de3bb53017aaf9441339e76c8 (diff) | |
download | FreeBSD-src-84c0874422f917c2b421d969c3519b7960c7233b.zip FreeBSD-src-84c0874422f917c2b421d969c3519b7960c7233b.tar.gz |
let the "exit" command return status when it is implicit
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c index edebcd7..72c0cfa 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: main.c,v 1.4 1996/08/11 22:50:58 ache Exp $ + * $Id: main.c,v 1.5 1996/09/01 10:20:38 peter Exp $ */ #ifndef lint @@ -339,11 +339,13 @@ exitcmd(argc, argv) int argc; char **argv; { + extern int oexitstatus; + if (stoppedjobs()) return 0; if (argc > 1) exitstatus = number(argv[1]); - exitshell(exitstatus); + exitshell(oexitstatus); /*NOTREACHED*/ return 0; } |