Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 1996 05:00:03 -0800 (PST)
From:      Peter Wemm <peter@spinner.DIALix.COM>
To:        freebsd-bugs
Subject:   bin/1990
Message-ID:  <199611101300.FAA06906@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR bin/1990; it has been noted by GNATS.

From: Peter Wemm <peter@spinner.DIALix.COM>
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...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611101300.FAA06906>