Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 1998 06:40:30 +1100 (EST)
From:      John Birrell <jb@cimlogic.com.au>
To:        jacques@oskar.nanoteq.co.za (Jacques Fourie)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Unable to open /dev/urandom when compiling with -lc_r
Message-ID:  <199801191940.GAA19791@freebsd1.cimlogic.com.au>
In-Reply-To: <199801191307.PAA01429@oskar.nanoteq.co.za> from Jacques Fourie at "Jan 19, 98 03:07:55 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801191940.GAA19791>