From owner-freebsd-current Fri Apr 3 15:22:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA26922 for freebsd-current-outgoing; Fri, 3 Apr 1998 15:22:45 -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 PAA26788 for ; Fri, 3 Apr 1998 15:22:17 -0800 (PST) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.5/8.7.3) id AAA07690; Sat, 4 Apr 1998 00:58:38 +0200 (CEST) Message-ID: <19980404005837.44468@cons.org> Date: Sat, 4 Apr 1998 00:58:37 +0200 From: Martin Cracauer To: Bruce Evans , cracauer@cons.org Cc: freebsd-current@FreeBSD.ORG Subject: Re: make/SIGINT (Re: cvs commit: src/bin/sh jobs.c) Mail-Followup-To: Bruce Evans , cracauer@cons.org, freebsd-current@FreeBSD.ORG References: <199803131513.CAA27634@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: <199803131513.CAA27634@godzilla.zeta.org.au>; from Bruce Evans on Sat, Mar 14, 1998 at 02:13:11AM +1100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <199803131513.CAA27634@godzilla.zeta.org.au>, Bruce Evans wrote: > >The appended fix seems to treat signals right for compat mode, > >too. I'll do some make world's with patched make and sh over the > >weekend and look for further trouble. > > I changed the handling of SIGQUIT and fixed the style bugs: > > diff -c2 compat.c~ compat.c > *** compat.c~ Mon Feb 24 01:43:20 1997 > --- compat.c Sat Mar 14 01:53:45 1998 > *************** > *** 126,130 **** > > } > ! exit (signo); > } > > --- 126,133 ---- > > } > ! if (signo == SIGQUIT) > ! exit(signo); > ! (void) signal(signo, SIG_DFL); > ! (void) kill(getpid(), signo); > } > > diff -c2 job.c~ job.c > *** job.c~ Mon Feb 24 01:43:21 1997 > --- job.c Fri Feb 13 05:06:16 1998 > *************** > *** 2905,2909 **** > } > (void) eunlink(tfile); > - exit(signo); > } > > --- 2905,2908 ---- > > SIGQUIT handling is still buggy. For the simple Makefile: > --- > foo: > sleep 1000 > --- > killing make with SIGQUIT gives the following behaviours: > > 1. make: exits with status 3 (SIGQUIT) (per the above change). > 2. make -j4: hangs (broken). > 3: gmake: exits with status 1. > 3: gmake -j4: exits with status 1. > > POSIX.2 only requires a nonzero exit status for SIGQUIT. We've just > fixed the handling of SIGINT, SIGTERM and SIGHUP. I'm not sure why you treat SIGQUIT specially. That way the script can't end immedeatly after the current job. And the user requests that all jobs in the current forground process group should dump core, so why not just resend SIGQUIT as well? 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message