Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Jul 2008 16:05:54 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        arch@FreeBSD.org, Sergey Babkin <babkin@verizon.net>
Subject:   Re: Proposal: a revoke() system call 
Message-ID:  <6882.1215446754@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 07 Jul 2008 16:30:06 %2B0100." <20080707162733.V63144@fledge.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20080707162733.V63144@fledge.watson.org>, Robert Watson writes:

>>> achieve something of the same end by opening /dev/null and then dup2()'ing 
>>> to the file descriptor you want to revoke, perhaps?  Right now there's a 
>>> known
>>
>> That's a great idea. I haven't thought about it. It should do everything.
>
>Right, and possibly this means that no additional kernel support is required 
>-- we just make it a libc or libutil interface.

I can't see how that could possibly work...

If you do a dup2(), the original fd is closed, and that still does not
release all threads that may be sleeing on it in device drivers.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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