<<On Tue, 24 Dec 2002 12:40:25 +0100, Poul-Henning Kamp <[EMAIL PROTECTED]> said:

> Isn't there a pretty obvious race between the revoke() and the open() ?

To the extent that the race matters, it is obviated by making sure
that only the current user has permission to open the device.  If the
user somehow manages to open a device that he owns anyway, it's his
problem if doing so screws it up.

revoke() was a POSIX invention; it replaces the older vhangup().  The
problem with vhangup() was that it merely signalled the previous
openers -- if they had a SIGHUP handler installed, they did not
actually lose access to the device.

AIX has an extension such as you suggest (they call it frevoke()).
AIX also implements it for all vnodes, not just device-specials, so it
is somewhat more general-purpose.  The POSIX function was introduced
for only one reason: to provide a secure replacement for vhangup() in
the POSIX tty model.  Thus, it is not fully general.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to