If we exit due to a SIGINT, do it with raise() so that the wait status is
correct in the parent.
This commit is contained in:
parent
c06643b836
commit
2e23138ad7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: error.c,v 1.20 1998/07/28 11:41:52 mycroft Exp $ */
|
||||
/* $NetBSD: error.c,v 1.21 1999/04/05 15:00:28 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)error.c 8.2 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: error.c,v 1.20 1998/07/28 11:41:52 mycroft Exp $");
|
||||
__RCSID("$NetBSD: error.c,v 1.21 1999/04/05 15:00:28 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -114,8 +114,10 @@ onint() {
|
||||
sigprocmask(SIG_SETMASK, &sigset, NULL);
|
||||
if (rootshell && iflag)
|
||||
exraise(EXINT);
|
||||
else
|
||||
_exit(128 + SIGINT);
|
||||
else {
|
||||
signal(SIGINT, SIG_DFL);
|
||||
raise(SIGINT);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user