Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh If we exit due to a SIGINT, do it with raise() so tha...



details:   https://anonhg.NetBSD.org/src/rev/a273f0904676
branches:  trunk
changeset: 471604:a273f0904676
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon Apr 05 15:00:28 1999 +0000

description:
If we exit due to a SIGINT, do it with raise() so that the wait status is
correct in the parent.

diffstat:

 bin/sh/error.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 2535be7d7797 -r a273f0904676 bin/sh/error.c
--- a/bin/sh/error.c    Mon Apr 05 14:59:35 1999 +0000
+++ b/bin/sh/error.c    Mon Apr 05 15:00:28 1999 +0000
@@ -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 @@
        sigprocmask(SIG_SETMASK, &sigset, NULL);
        if (rootshell && iflag)
                exraise(EXINT);
-       else
-               _exit(128 + SIGINT);
+       else {
+               signal(SIGINT, SIG_DFL);
+               raise(SIGINT);
+       }
        /* NOTREACHED */
 }
 



Home | Main Index | Thread Index | Old Index