Re: [PATCH][2.1.71] BSD revoke() syscall

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 9 Dec 1997 20:03:32 +0000 (GMT)


> You really want to do the close as part of the revoke, and then make the
> revoke'd close be pretty much a no-op. (See the tty code, which does
> something a bit more complex, but it's the same basic idea.)
>
> The reason for this is because you need to get the ref-counting right so
> that the semantics with close() lowering DTR, etc. still apply even
> though there are revoke'd file descriptors hanging around. (Similar

You've just solved the races sort of too

while(REFERENCES_LEFT(fp))
sleep_on(fp->something)

??