Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!ncis.tis.llnl.gov!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.unix.programmer Subject: Re: Checking if a process opened a file Message-ID: <11849@dog.ee.lbl.gov> Date: 5 Apr 91 23:10:36 GMT References: Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 18 X-Local-Date: Fri, 5 Apr 91 15:10:36 PST In article it1@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@ee.lbl.gov