Re: VFS/fcntl() feature [PATCH]

H. Peter Anvin (hpa@transmeta.com)
28 Aug 1998 06:41:07 GMT


Followup to: <Pine.LNX.3.96.980827175305.1035A-100000@air.steve.net>
By author: "Steven N. Hirsch" <shirsch@adelphia.net>
In newsgroup: linux.dev.kernel
>
> On Thu, 27 Aug 1998, Rene Janssen wrote:
>
> >
> > I have a new feature for the Linux virtual filesystem. My patch against
> > 2.1.118 adds a new fcntl() function (F_SET_SIGVFS) that instructs the
> > VFS to send a signal to userland if a specific inode (file/dir) has
> > changed. You only have to open the file/dir for reading and give a mask
> > and signalnr to fcntl(). Thats all. The program wakes up when something
> > happens and you can do a fstat() or readdir() to figure out _what_ the
> > changes are. Simple, small, no obscure API. Currently the only way to
> > do this is by frequently polling which is mostly not what you would like
> > to do.
> >
> > Please check the patch out. I dont see any complications.
>
> I wish this was a POSIX-defined feature. Many things I write to earn my
> living require knowing about changes in directories or files.
>
> Steve
>

I was talking to someone about this before, and I then suggested
having a notification pipe the kernel could write to. A little more
heavyweight than your proposal, I believe.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html