rich@eddie.MIT.EDU (Richard Caloggero) (05/09/89)
How is "tail -1f" implemented? Is there an IOCTL or FCNTRL parameter which allows one to wait for some sort of status event (like size change), or does tail just keep checking and sleeping? -- -- Rich (rich@eddie.mit.edu). The circle is open, but unbroken. Merry meet, merry part, and merry meet again.
guy@auspex.auspex.com (Guy Harris) (05/10/89)
>Is there an IOCTL or FCNTRL parameter which allows one to wait for some >sort of status event (like size change), Not on any UNIX system with which I'm familiar with (and, in case anybody suggests "select", I point out that it doesn't do this either - we've been through that already). >or does tail just keep checking and sleeping? You got it.
schwartz@shire.cs.psu.edu (Scott Schwartz) (05/11/89)
In article <1605@auspex.auspex.com>, guy@auspex (Guy Harris) writes: >>Is there an IOCTL or FCNTRL parameter which allows one to wait for some >>sort of status event (like size change), >Not on any UNIX system with which I'm familiar with Doesn't the Andrew File System implement callbacks of some sort? -- Scott Schwartz <schwartz@shire.cs.psu.edu>
guy@auspex.auspex.com (Guy Harris) (05/12/89)
>>>Is there an IOCTL or FCNTRL parameter which allows one to wait for some >>>sort of status event (like size change), > >>Not on any UNIX system with which I'm familiar with > >Doesn't the Andrew File System implement callbacks of some sort? Yes, but - at least according to the USENIX paper - that's only a notification sent from the server saying that *it* has modified the file (presumably, either due to a local modification or a remote "pushback"); it says nothing about *local* size changes. Furthermore, there's no indication that this information is passed up to userland, and that's the crux of the matter; there's no way for user-mode code to block waiting for a file to change. Without that, the callbacks don't make any difference; with that, the callbacks can be used, but they'd just be another source of "file changed" notifications - good old "write", for example, would be another source, and possibly a more likely one.
willy@idca.tds.PHILIPS.nl (Willy Konijnenberg) (05/12/89)
In article <4567@psuvax1.cs.psu.edu> schwartz@shire.cs.psu.edu (Scott Schwartz) writes: >In article <1605@auspex.auspex.com>, guy@auspex (Guy Harris) writes: >>>Is there an IOCTL or FCNTRL parameter which allows one to wait for some >>>sort of status event (like size change), >> >>Not on any UNIX system with which I'm familiar with >Doesn't the Andrew File System implement callbacks of some sort? I think callbacks are part of the internal cache synchronisation protocol of AFS, not a user interface feature. -- Willy Konijnenberg <willy@idca.tds.philips.nl>
kbe@dde.uucp (Kjeld Borch Egevang) (05/17/89)
rich@eddie.MIT.EDU (Richard Caloggero) writes: > How is "tail -1f" implemented? Is there an IOCTL or FCNTRL >parameter which allows one to wait for some sort of status event (like >size change), or does tail just keep checking and sleeping? I've been told that in our SysV-implementation (3.1) there is a loop with a read (from the file), a write (to the terminal) and a sleep(1). | UUCP: kbe@dde.dk (Kjeld Borch Egevang) | Dansk Data Elektronik | or ...mcvax!enea!dkuug!dde!kbe | Denmark