[259] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Re: accept on FreeBSD 2.1

daemon@ATHENA.MIT.EDU ("John H. Aughey")
Fri Feb 9 01:08:12 1996

To: Christopher Provenzano <proven@MIT.EDU>
Cc: pthreads@MIT.EDU
In-Reply-To: Your message of "Thu, 08 Feb 1996 23:41:24 EST."
             <9602090441.AA20495@bart-savagewood.MIT.EDU> 
Date: Fri, 09 Feb 1996 00:43:13 -0500
From: jha@cs.purdue.edu ("John H. Aughey")

Christopher Provenzano <proven@MIT.EDU> wrote:
> This problem is probably caused when select() passes the number of file 
> descriptors (the first arg) larger than FD_SETSIZE. This causes select() 
> to return EINVAL. The solution is either to limit the number of file 
> descriptors your process can use to 256 or you can fix fd_init() in 
> pthread/fd.c to check dtablesize against FD_SETSIZE.

Thank you very much.  I'll be sure to put a setrlimit in main() or make
sure my descriptor limit is set in my shell.  It did work when I
limited it.

Now back to a question I posed a few weeks ago; what should the
behavior be if a thread closes a descriptor while another thread is
blocked reading from the descriptor?  The expected behavior would be
for the descriptor to close and the read would return EBADF or some
other error.  Currently both threads deadlock.

-John

home help back first fref pref prev next nref lref last post