Checking if a process opened a file
Chris Torek
torek at elf.ee.lbl.gov
Sat Apr 6 09:10:36 AEST 1991
In article <it1.670574750 at Isis.MsState.Edu> it1 at Isis.MsState.Edu (Tim Tsai)
writes:
> Is it possible to check if a process (possibly from another machine
>via NFS) opened a file for reading/writing?
No.
>What is an "exceptional condition"?
Anything and nothing---the select system call simply calls some
associated function (fp->f_ops->fo_select) asking `do you want to
report an exceptional condition'. Ordinary files invariably answer
`no'. Device files (`character special') simply pass the question
on to the device driver; sockets answer `yes' if the socket is marked
as having `out of band' data (which again is up to lower level code).
--
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA Domain: torek at ee.lbl.gov
More information about the Comp.unix.programmer
mailing list