diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-11-14 17:56:48 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-11-14 17:56:48 +0000 |
commit | d29c7f8a98e86e9a224ddb62125e168b8b011746 (patch) | |
tree | da2ccb9234315b3b3f51cfb3b446de0fdb36ecef /bin | |
parent | 35e923b51703c77d8dfa13e370c44efc83763bc6 (diff) |
Fix a core dump caused by a signal race; yval@hackers.co.il
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/main.c | 9 |
1 files 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; } /* |