Revokes access to a file by other processes.
int frevoke (FileDescriptor) int FileDescriptor;
The frevoke subroutine revokes access to a file by other processes.
All accesses to the file are revoked, except through the file descriptor specified by the FileDescriptor parameter to the frevoke subroutine. Subsequent attempts to access the file, using another file descriptor established before the frevoke subroutine was called, fail and cause the process to receive a return value of -1, and the errno global variable is set to EBADF .
A process can revoke access to a file only if its effective user ID is the same as the file owner ID or if the invoker has root user authority.
Note: The frevoke subroutine has no affect on subsequent attempts to open the file. To ensure exclusive access to the file, the caller should change the mode of the file before issuing the frevoke subroutine. Currently the frevoke subroutine works only on terminal devices.
FileDescriptor | A file descriptor returned by a successful open subroutine. |
Upon successful completion, the frevoke subroutine returns a value of 0.
If the frevoke subroutine fails, it returns a value of -1 and the errno global variable is set to indicate the error.
The frevoke subroutine fails if the following is true: