From owner-freebsd-hackers Mon Jan 19 11:42:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA09809 for hackers-outgoing; Mon, 19 Jan 1998 11:42:33 -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 LAA09793 for ; Mon, 19 Jan 1998 11:42:14 -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 GAA19791; Tue, 20 Jan 1998 06:40:30 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199801191940.GAA19791@freebsd1.cimlogic.com.au> Subject: Re: Unable to open /dev/urandom when compiling with -lc_r In-Reply-To: <199801191307.PAA01429@oskar.nanoteq.co.za> from Jacques Fourie at "Jan 19, 98 03:07:55 pm" To: jacques@oskar.nanoteq.co.za (Jacques Fourie) Date: Tue, 20 Jan 1998 06:40:30 +1100 (EST) Cc: 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 Jacques Fourie wrote: > I am unable to open /dev/urandom when compiling with -lc_r. The open() call > returns -1, with errno set to 25 (ENOTTY). The device driver does not support non-blocking accesses. It is reporting "Inappropriate ioctl for device". libc_r needs to make all file descriptors non-blocking so that it can switch threads in user-space without being held up in the kernel. Not all device drivers support this, though. The move to kernel threads solves this problem once and for all, but that doesn't help you now. 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