Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

[Caml-list] Inotify binding

瀏覽次數:4 次
跳到第一則未讀訊息

Vincent Hanquez

未讀,
2006年11月21日 下午3:20:572006/11/21
收件者:caml...@yquem.inria.fr
Hi,

I've made a small bindings for inotify, aka linux file system notification
new subsystem.

It's available here:

http://tab.snarc.org/projects/ocaml_inotify/

or the archive is directly here:

http://tab.snarc.org/download/ocaml/ocaml_inotify-0.2.tar.bz2

You need a really recent glibc to have inotify syscall available
through /usr/include/sys/inotify.h. I didn't bother putting some code
to handle old glibc, but I accept patch :)

The archive contains an example program on how to use the interface.

Cheers,
--
Vincent Hanquez

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Richard Jones

未讀,
2006年11月21日 下午6:59:012006/11/21
收件者:Vincent Hanquez
On Tue, Nov 21, 2006 at 09:18:34PM +0100, Vincent Hanquez wrote:
> I've made a small bindings for inotify, aka linux file system notification
> new subsystem.

I think OMake includes bindings for gamin. Or FAM which is the older
SGI-based daemon, but gamin is C API compatible with FAM.

http://svn.metaprl.org/viewvc/mojave/omake/src/clib/omake_notify.c?revision=1326&view=markup&pathrev=1326
http://www.gnome.org/~veillard/gamin/

Rich.

--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
Merjis blog - http://blog.merjis.com - NEW!

Vincent Hanquez

未讀,
2006年11月21日 晚上7:18:522006/11/21
收件者:Richard Jones
On Tue, Nov 21, 2006 at 11:55:46PM +0000, Richard Jones wrote:
> On Tue, Nov 21, 2006 at 09:18:34PM +0100, Vincent Hanquez wrote:
> > I've made a small bindings for inotify, aka linux file system notification
> > new subsystem.
>
> I think OMake includes bindings for gamin.

it seems to be talking FAM.

> Or FAM which is the older
> SGI-based daemon, but gamin is C API compatible with FAM.

Sounds more like a bad thing than a good thing to me.
Direct inotify binding are much smaller/simpler anyway.

Cheers,
--
Vincent Hanquez

Aleksey Nogin

未讀,
2006年11月29日 凌晨1:30:232006/11/29
收件者:Vincent Hanquez
On 21.11.2006 16:16, Vincent Hanquez wrote:

> On Tue, Nov 21, 2006 at 11:55:46PM +0000, Richard Jones wrote:
>> On Tue, Nov 21, 2006 at 09:18:34PM +0100, Vincent Hanquez wrote:
>>> I've made a small bindings for inotify, aka linux file system notification
>>> new subsystem.
>> I think OMake includes bindings for gamin.
>
> it seems to be talking FAM.

Actually, in our LibMojave (which is what OMake uses) we have bindings for:
- FAM
- Gamin (using either the generic FAM interface, or taking advantage of
Gamin extensions)
- kqueue (FreeBSD, OS X)
- inotify (Linux)
- ??? (Win32) - not sure what exactly is used there

In all five cases, we provide the _same_ fam-style interface on the
OCaml side. We also have OMake autoconf-style scripts that can detect
which of the fours notification mechanisms is present on a specific
machine and use the appropriate one.

> Sounds more like a bad thing than a good thing to me.
> Direct inotify binding are much smaller/simpler anyway.

That might be true, but only if you happen to be on a machine that
provides inotify. We do utilize inotify if it is present, but we also
have an option of using one of the other four when there is no inotify.

Aleksey

0 則新訊息