Re: BUG in TCP for multithreaded apps

Eric Paire (paire@ri.silicomp.fr)
Thu, 09 Dec 1999 16:17:55 +0100


Alan,

> > I think there is a misunderstanding here. The f_count field in the file
> > structure is *NOT* incremented by the select() system call. Therefore a
>
> It is. We fget() each handle involved
>
Sorry, I did not check completely the code. *NOW*, my problem remains the
following: If a thread does select() on a file descriptor that is closed
during the select() wait (the f_count is 1), do you think that it is a
good behaviour that the thread remains blocked forever, since nothing
will ever happen on this file descriptor, since unreachable after close()
(in sys_close(), the file pointer is nullified).

My understanding is that the thread should be awaken only if waiting on
POLLERR event, which corresponds to the fact that any attempt to do
anything on the file descriptor will return an error. I think that this
a coherent behaviour.

-Eric
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web : http://www.ri.silicomp.com/~paire | Group SILICOMP - Research Institute
Email: eric.paire@ri.silicomp.com | 2, avenue de Vignate
Phone: +33 (0) 476 63 48 71 | F-38610 Gieres
Fax : +33 (0) 476 51 05 32 | FRANCE

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/