From 84c0874422f917c2b421d969c3519b7960c7233b Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 8 Sep 1996 03:12:22 +0000 Subject: let the "exit" command return status when it is implicit --- bin/sh/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/sh/main.c') 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; } -- cgit v1.1