From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 27 11:00:48 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 E77701065673 for ; Wed, 27 Feb 2008 11:00:47 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: from web57710.mail.re3.yahoo.com (web57710.mail.re3.yahoo.com [68.142.236.73]) by mx1.freebsd.org (Postfix) with SMTP id B041F8FC13 for ; Wed, 27 Feb 2008 11:00:47 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: (qmail 13356 invoked by uid 60001); 27 Feb 2008 11:00:46 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=d+94ytNCE41koElhLg4PJ3QNkIUYbEcPvrGKabceEMwZW07Qdpa29tS5SbvRE4XaV702N3W5PorTWpp4pkZRUHm3Fr1YAluhJZaAP3xSLFaYcqLRKKgLY3U71Ro/mNaIj+Uqeh1UiaIMwuDNSlN1OZd9W1no3lfH+7SI7FA6s/g=; X-YMail-OSG: _8641HoVM1nJaB5HnbSFDPWfo83Xai3SB4nW5VBIacek8Vw8jutAcml7v4SopP6gfPvUkosr_gt0FdRI773i9EdIJ7Wejr0hz3xeFJ.VMdsVCoka8sOe8v.l8ko01sY- Received: from [124.30.112.50] by web57710.mail.re3.yahoo.com via HTTP; Wed, 27 Feb 2008 03:00:46 PST Date: Wed, 27 Feb 2008 03:00:46 -0800 (PST) From: "Sanjeev Kumar.S" To: Peter Jeremy In-Reply-To: <20080227085932.GV83599@server.vk2pj.dyndns.org> MIME-Version: 1.0 Message-ID: <670902.8665.qm@web57710.mail.re3.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: synchronous freebsd print X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 11:00:48 -0000 > This is a standard C question. Sorry, if this clarification is too simple, but I thought freeBSD kernel implemented its own print function. and the man for fflush says it is in the standard C-library. and the kernel source has no defn for fflush. I saw lots of kernel related questions asked in this list, so I posted my question here. Please correct me if I am wrong. and Yes in the kernel code I have a "\n" at the end of my print, still the print is not complete and the line next to it that causes the crash does not give the result I want. Is this a common scenario or am I doing something wrong. Sanjeev. 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) -- Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.