From owner-freebsd-hackers Mon Jan 19 17:08:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA11613 for hackers-outgoing; Mon, 19 Jan 1998 17:08:12 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freebsd1.cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA11582 for ; Mon, 19 Jan 1998 17:06:58 -0800 (PST) (envelope-from jb@freebsd1.cimlogic.com.au) Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.8.7/8.8.7) id MAA20451; Tue, 20 Jan 1998 12:12:17 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199801200112.MAA20451@freebsd1.cimlogic.com.au> Subject: Re: Unable to open /dev/urandom when compiling with -lc_r In-Reply-To: <199801191840.SAA18894@fang.cs.sunyit.edu> from Alfred Perlstein at "Jan 19, 98 05:36:39 pm" To: perlsta@sunyit.edu (Alfred Perlstein) Date: Tue, 20 Jan 1998 12:12:17 +1100 (EST) Cc: jacques@oskar.nanoteq.co.za, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Alfred Perlstein wrote: > quick thought, why not do something like this: > > p = pipe() > > if(fork()==0) > > pass 'p' to both processes > > one process reads from /dev/urandom, the other reads off the pipe > non-blocking? This will not solve the problem. A program linked with libc_r appears to have a blocking interface to the programmer with the library converting blocking calls into non-blocking ones. The problem here cannot be solved by anything other than (a) adding non-blocking support to the driver; or (b) replacing the user-thread implementation with kernel threads which don't suffer from this problem. Regards, -- John Birrell - jb@cimlogic.com.au; jb@netbsd.org; jb@freebsd.org CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137