From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 27 16:15:40 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24851065674 for ; Wed, 27 Feb 2008 16:15:40 +0000 (UTC) (envelope-from jtoothman@about.com) Received: from mail.about.com (mta.about.com [207.241.148.60]) by mx1.freebsd.org (Postfix) with ESMTP id A1ED58FC13 for ; Wed, 27 Feb 2008 16:15:40 +0000 (UTC) (envelope-from jtoothman@about.com) Received: (qmail 36074 invoked from network); 27 Feb 2008 15:48:57 -0000 Received: from unknown (HELO JKT.local) ([216.223.13.111]) (envelope-sender ) by mail4.ops.about-inc.com (qmail-ldap-1.03) with SMTP for ; 27 Feb 2008 15:48:57 -0000 Message-ID: <47C586C4.9010703@about.com> Date: Wed, 27 Feb 2008 10:50:28 -0500 From: "James K. Toothman" Organization: About, Inc. User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 References: <1204051337.47c45d89ea6eb@imp.free.fr> <284719.71279.qm@web57708.mail.re3.yahoo.com> <20080227085932.GV83599@server.vk2pj.dyndns.org> In-Reply-To: <20080227085932.GV83599@server.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: synchronous freebsd print X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jtoothman@about.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 16:15:41 -0000 Use fprintf(stderr, ...) instead, as stderr is unbuffered by default. James Toothman About.com Peter Jeremy wrote: > On Wed, Feb 27, 2008 at 12:08:28AM -0800, Sanjeev Kumar.S wrote: > >> I have a quick question, and I believe this will >> be a common requirement. >> > > This is a standard C question. > > >> I do a print of some data and then immediately >> in a next statement there is a crash. >> > ... > >> Is there anyway to get the complete print >> before executing the next instruction. >> > > Look at fflush(3) > >