Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 1998 12:12:17 +1100 (EST)
From:      John Birrell <jb@freebsd1.cimlogic.com.au>
To:        perlsta@sunyit.edu (Alfred Perlstein)
Cc:        jacques@oskar.nanoteq.co.za, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Unable to open /dev/urandom when compiling with -lc_r
Message-ID:  <199801200112.MAA20451@freebsd1.cimlogic.com.au>
In-Reply-To: <199801191840.SAA18894@fang.cs.sunyit.edu> from Alfred Perlstein at "Jan 19, 98 05:36:39 pm"

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



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