From d29c7f8a98e86e9a224ddb62125e168b8b011746 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 14 Nov 1999 17:56:48 +0000 Subject: Fix a core dump caused by a signal race; yval@hackers.co.il --- bin/ksh/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/ksh/main.c b/bin/ksh/main.c index 013cfb32ff3..af0ff1c0bec 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.17 1999/08/04 19:11:13 millert Exp $ */ +/* $OpenBSD: main.c,v 1.18 1999/11/14 17:56:47 millert Exp $ */ /* * startup, main loop, environments and error handling @@ -530,10 +530,15 @@ command(comm) const char *comm; { register Source *s; + Source *volatile sold; + int i; s = pushs(SSTRING, ATEMP); s->start = s->str = comm; - return shell(s, FALSE); + sold = source; + i = shell(s, FALSE); + source = sold; + return i; } /* -- cgit v1.2.3