Re: Query on UDP Sockets on Linux.
Andi Kleen (ak@suse.de)
Thu, 29 Jun 2000 13:07:19 +0200
On Thu, Jun 29, 2000 at 05:55:15PM +0900, kumon@flab.fujitsu.co.jp wrote:
> Andrey Savochkin writes:
> > The question is not about breaking inetd. Certainly, fd closing should be
> > an operation without side effects and shouldn't interfere with socket
> > operations on other processes sharing it. Otherwise any program with open
> > sockets is forbidden to fork and do independent things in the two branches.
> >
> > So, I think, the answer for the original question should be that the
> > observed behavior (blocking recvmsg) is intended.
> >
>
> Is it true when the fds are shared among threads?
> e.g. __clone() with CLONE_FILES.
Yes, because the recvmsg increases the reference count of the fd
while operating (so that it doesn't go away under it). Fixing the problem
requires an overhaul of the reference counting system. I forgot that
can of worms in my original replies, although I should have known
better..
-Andi
-
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/