From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 27 12:57:14 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 5C93C1065670 for ; Wed, 27 Feb 2008 12:57:14 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 27D318FC1C for ; Wed, 27 Feb 2008 12:57:14 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=HbcjWVUBQdP7/o28S6DvG+KhjRhBq3VqBUxkTIpk1DJl/tvx06yS/al8LVCaJaQ+fyRS07UEF9DWEFqLBR7nnoZLWm0zOkmCJ/om37MIoXQe/L33Ibo3YXbL2figpiC3/SnNy8cXoj+KZRjTg92eqNMuQRqWPhHFbsdPpRn7Blk=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1JULqS-000Mai-9T; Wed, 27 Feb 2008 15:57:12 +0300 Date: Wed, 27 Feb 2008 15:57:11 +0300 From: Eygene Ryabinkin To: "Sanjeev Kumar.S" Message-ID: References: <20080227085932.GV83599@server.vk2pj.dyndns.org> <670902.8665.qm@web57710.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <670902.8665.qm@web57710.mail.re3.yahoo.com> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-1.7 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_50 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 12:57:14 -0000 Sanjeev, Wed, Feb 27, 2008 at 03:00:46AM -0800, Sanjeev Kumar.S wrote: > 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. If you're not defining PRINTF_BUFR_SIZE, then, judging by the /sys/kern/subr_prf.c, output will be unbuffered in any case. However, kernel printf is not protected by locks, so it can be interrupted by another thread, if I am correct. May be ddb(4) will become your friend? -- Eygene