caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Inotify binding
@ 2006-11-21 20:18 Vincent Hanquez
  2006-11-21 23:55 ` [Caml-list] " Richard Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Hanquez @ 2006-11-21 20:18 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Inotify binding
  2006-11-21 20:18 Inotify binding Vincent Hanquez
@ 2006-11-21 23:55 ` Richard Jones
  2006-11-22  0:16   ` Vincent Hanquez
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Jones @ 2006-11-21 23:55 UTC (permalink / raw)
  To: Vincent Hanquez; +Cc: caml-list

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!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Inotify binding
  2006-11-21 23:55 ` [Caml-list] " Richard Jones
@ 2006-11-22  0:16   ` Vincent Hanquez
  2006-11-29  6:28     ` Aleksey Nogin
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Hanquez @ 2006-11-22  0:16 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Inotify binding
  2006-11-22  0:16   ` Vincent Hanquez
@ 2006-11-29  6:28     ` Aleksey Nogin
  0 siblings, 0 replies; 4+ messages in thread
From: Aleksey Nogin @ 2006-11-29  6:28 UTC (permalink / raw)
  To: Vincent Hanquez; +Cc: Richard Jones, caml-list, omake-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-29  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-21 20:18 Inotify binding Vincent Hanquez
2006-11-21 23:55 ` [Caml-list] " Richard Jones
2006-11-22  0:16   ` Vincent Hanquez
2006-11-29  6:28     ` Aleksey Nogin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).