From owner-freebsd-current Fri Apr 3 15:22:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA26787 for freebsd-current-outgoing; Fri, 3 Apr 1998 15:22:17 -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 PAA26781 for ; Fri, 3 Apr 1998 15:22:11 -0800 (PST) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.5/8.7.3) id BAA07756; Sat, 4 Apr 1998 01:05:17 +0200 (CEST) Message-ID: <19980404010516.63824@cons.org> Date: Sat, 4 Apr 1998 01:05:16 +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: <199803170406.PAA27158@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=S0zKkzwUGydFO0od X-Mailer: Mutt 0.89i In-Reply-To: <199803170406.PAA27158@godzilla.zeta.org.au>; from Bruce Evans on Tue, Mar 17, 1998 at 03:06:43PM +1100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --S0zKkzwUGydFO0od Content-Type: text/plain; charset=us-ascii In <199803170406.PAA27158@godzilla.zeta.org.au>, Bruce Evans wrote: > truss(1) has much the same problem as make(1). ktrace(1) works right > (not surprising - it doesn't fork). The appended fix should fix truss. I treated SIGQUIT as you did for make(1), but see my mail from two minutes ago - is that the right thing? 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 --S0zKkzwUGydFO0od Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff diff -c -r usr.bin/truss/main.c usr.bin/truss.work/main.c *** usr.bin/truss/main.c Sat Feb 7 12:20:54 1998 --- usr.bin/truss.work/main.c Sat Apr 4 00:53:53 1998 *************** *** 127,132 **** --- 127,133 ---- struct ex_types *funcs; int in_exec = 0; char *fname = NULL; + int sigexit = 0; while ((c = getopt(ac, av, "p:o:S")) != -1) { switch (c) { *************** *** 216,221 **** --- 217,223 ---- break; case S_SIG: fprintf(outfile, "SIGNAL %d\n", pfs.val); + sigexit = pfs.val; break; case S_EXIT: fprintf (outfile, "process exit, rval = %d\n", pfs.val); *************** *** 232,236 **** --- 234,244 ---- if (ioctl(Procfd, PIOCCONT, val) == -1) warn("PIOCCONT"); } while (pfs.why != S_EXIT); + if (sigexit) { + if (sigexit == SIGQUIT) + exit(sigexit); + (void) signal(sigexit, SIG_DFL); + (void) kill(getpid(), sigexit); + } return 0; } --S0zKkzwUGydFO0od-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message