From owner-cvs-all Mon Dec 21 19:52:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA16209 for cvs-all-outgoing; Mon, 21 Dec 1998 19:52:38 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA16192; Mon, 21 Dec 1998 19:52:32 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id TAA02688; Mon, 21 Dec 1998 19:50:20 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199812220350.TAA02688@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Joseph Koshy cc: Michael Smith , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/truss main.c In-reply-to: Your message of "Mon, 21 Dec 1998 19:28:37 PST." <199812220328.TAA12314@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Dec 1998 19:50:19 -0800 From: Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > > > msmith 1998/12/20 22:34:50 PST > > > > Modified files: > > usr.bin/truss main.c > > Log: > > Flush the output file before exiting; short-lived programs don't even fill > > the stdio buffer. > > Shouldn't calling exit(3) flush open buffers before exiting? Returning > from main() should be equivalent to calling exit(3). Truss doesn't return from main() in the case where the child is killed by a fatal signal; it kills itself with the same signal. > > @@ -254,6 +254,7 @@ > if (ioctl(Procfd, PIOCCONT, val) == -1) > warn("PIOCCONT"); > } while (pfs.why != S_EXIT); > + fflush(outfile); > if (sigexit) { > if (sigexit == SIGQUIT) > exit(sigexit); > > Thanks, > Koshy > > > > -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message