Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2000 22:57:53 +0000
From:      Tony Finch <dot@dotat.at>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        Alfred Perlstein <bright@wintelcom.net>, arch@FreeBSD.ORG, net@FreeBSD.ORG
Subject:   Re: patch to cleanup inflight desciptor handling.
Message-ID:  <20001213225753.B30050@hand.dotat.at>
In-Reply-To: <200012132124.eBDLOBU68538@hak.lan.Awfulhak.org>
References:  <bright@wintelcom.net> <200012132124.eBDLOBU68538@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Somers <brian@Awfulhak.org> wrote:
>
>Hmm, the last time i looked at this, I believe the whole thing was 
>dealt with by not increasing the file descriptor reference count 
>when it was put in the message header.  If process A closed the 
>descriptor before process B actually recvmsg()d it, it would be 
>EBADF.  The recvmsg() actually incremented the reference count.

But it has always been documented behaviour that the receiving process
gets a valid descriptor even if the sender closes it directly after
sendmsging it. If this was not the case then descriptor handoff would
require an "ok" reply from the receiving process before the sender
could close it, which is a pain.

Hmm, the only references for this I can think of are Stevens and the
red & black daemon books, but I'm sure I've read a good discussion of
it somewhere else.

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
"And remember my friend, future events such
as these will affect you in the future."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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