From owner-freebsd-current Wed Mar 11 04:06:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA00496 for freebsd-current-outgoing; Wed, 11 Mar 1998 04:06:20 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA00469 for ; Wed, 11 Mar 1998 04:06:12 -0800 (PST) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.5/8.7.3) id NAA07524; Wed, 11 Mar 1998 13:08:13 +0100 (CET) Message-ID: <19980311130811.56794@cons.org> Date: Wed, 11 Mar 1998 13:08:11 +0100 From: Martin Cracauer To: Bruce Evans Cc: cracauer@cons.org, freebsd-current@FreeBSD.ORG Subject: make/SIGINT (Re: cvs commit: src/bin/sh jobs.c) References: <199802121713.EAA30328@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81 In-Reply-To: <199802121713.EAA30328@godzilla.zeta.org.au>; from Bruce Evans on Fri, Feb 13, 1998 at 04:13:51AM +1100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <199802121713.EAA30328@godzilla.zeta.org.au>, Bruce Evans wrote: > I've seen some problems with my version of the fix. The serious ones > (2-3) probably affect all versions. > > 1) When `make' of a kernel is killed by ^C, the newline to clean up > the output is printed after the shell prompt appears, so it messes > up the output. This problem doesn't occur if /bin/sh is bash-1. > > 2) Shell scripts with `make' commands in them are hard to kill. This > problem still occurs if /bin/sh is bash-1. It seems to be a bug in > `make'. According to a draft of POSIX.2, `make' shall catch SIGINT, > SIGQUIT, SIGTERM and SIGHUP in order to clean up, but it shall resend > SIGINT, SIGTERM and SIGHUP (but not necessarily SIGQUIT) to itself in > order to exit with a signal status. `make' doesn't do this (at least > in -current). Gnu make does it. > > 3) Recursive makes (e.g., of /usr/src) are very hard to kill. This seems > to be caused by the same bug in `make'. What about the appended fix for make? It seems to fix the problem for the non-compat mode of make. As our make is in compat mode by default even if -B is not given, people would have to use `make -j 1` for now to test it. What were the reasons to use compat mode by default, BTW? Anyone has test cases that fail in new mode with just one job allowed? I added a few make tests to the sh-testsuite regarding SIGINT handling, as usual at hub.freebsd.org:/home/cracauer/public_html/ or http://www.freebsd.org/~cracauer/ in directory testsuite/makestuff/ Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer cracauer@wavehh.hanse.de (batched, preferred for large mails) Tel.: (daytime) +4940 41478712 Fax.: (daytime) +4940 41478715 Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany diff -c make.original/job.c make.work/job.c *** make.original/job.c Tue Aug 26 12:06:38 1997 --- make.work/job.c Wed Mar 11 12:49:52 1998 *************** *** 2904,2910 **** } } (void) eunlink(tfile); ! exit(signo); } /* --- 2904,2918 ---- } } (void) eunlink(tfile); ! ! /* ! * For some signals, we don't want a direct exit, but to ! * let them resent to ourself, which is done by the calling ! * Routine. ! */ ! ! if (signo != SIGINT && signo != SIGTERM && signo != SIGHUP) ! exit(signo); } /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message