From owner-cvs-all Mon Dec 21 19:28:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA12322 for cvs-all-outgoing; Mon, 21 Dec 1998 19:28:40 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: (from jkoshy@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA12314; Mon, 21 Dec 1998 19:28:37 -0800 (PST) (envelope-from jkoshy) Date: Mon, 21 Dec 1998 19:28:37 -0800 (PST) From: Joseph Koshy Message-Id: <199812220328.TAA12314@hub.freebsd.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Michael Smith Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/truss main.c In-Reply-To: Your message of "Sun, 20 Dec 1998 22:34:50 PST." <199812210634.WAA23273@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain 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). @@ -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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message