From owner-freebsd-bugs Sun Nov 10 05:00:07 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA06921 for bugs-outgoing; Sun, 10 Nov 1996 05:00:07 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA06906; Sun, 10 Nov 1996 05:00:03 -0800 (PST) Date: Sun, 10 Nov 1996 05:00:03 -0800 (PST) Message-Id: <199611101300.FAA06906@freefall.freebsd.org> To: freebsd-bugs Cc: From: Peter Wemm Subject: bin/1990 Reply-To: Peter Wemm Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/1990; it has been noted by GNATS. From: Peter Wemm To: freebsd-gnats-submit@freefall.freebsd.org Cc: Subject: bin/1990 Date: Sun, 10 Nov 1996 20:51:50 +0800 (WST) A possible fix for the make/sh bug with SIGINT: Index: eval.c =================================================================== RCS file: /home/ncvs/src/bin/sh/eval.c,v retrieving revision 1.7 diff -u -r1.7 eval.c --- eval.c 1996/10/22 03:02:07 1.7 +++ eval.c 1996/11/10 12:39:58 @@ -854,7 +854,7 @@ parent: /* parent process gets here (if we forked) */ if (mode == 0) { /* argument to fork */ INTOFF; - if (minusc) { + if (minusc && !eflag) { struct sigaction iact, qact, oiact, oqact; (void)sigaction(SIGINT, (struct sigaction *)NULL, &oiact); This makes 'sh -ec' consider SIGINT as an 'error' worth aborting, and stops the long 'make fetch' command on ^C as it should. The 'if (minusc) {..' code was recently added (rev 1.7 of eval.c), it seems to be the cause of the problems. Incidently, I could find no other shells that ignored SIGINT while doing a 'sh -c' command.. Is this code really legitimate?? It looks like a gratuitous incompatability with "other" systems...