From owner-freebsd-questions Tue Jul 27 20:24:26 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (Postfix) with ESMTP id C705614F0E; Tue, 27 Jul 1999 20:24:13 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.3/8.9.1) id NAA55212; Wed, 28 Jul 1999 13:30:57 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199907280330.NAA55212@cimlogic.com.au> Subject: Re: uthread_init.c: 'Cannot get stdio flags' :-( In-Reply-To: <199907280150.VAA07686@misha.cisco.com> from Mikhail Teterin at "Jul 27, 1999 09:50:32 pm" To: mi@aldan.algebra.com Date: Wed, 28 Jul 1999 13:30:56 +1000 (EST) Cc: questions@freebsd.org, stable@freebsd.org, eischen@vigrid.com, jb@cimlogic.com.au X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mikhail Teterin wrote: > Under what circumstances could a panic: > > Fatal error 'Cannot get stdio flags' at line ? in file > /usr/src/lib/libc_r/uthread/uthread_init.c (errno = ?) > > be triggered? > > We are trying to replace HylaFAX's ${PREFIX}/sbin/faxsend with our own > application, which is written with threads. The app works fine if called > directly -- from command line. But it dies a horrible death when > actually invoked by HylaFAX's ${PREFIX}/sbin/faxq. Here is a rather > short ktrace produced by replacing faxsend with a shell wrapper: Looks like ${PREFIX}/sbin/faxq has closed file descriptor 0 (stdin). It's legal to do that, so our thread initialisation will have to check for EBADF and not fail in that case. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message