From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL,HTML_MESSAGE, MIME_HTML_ONLY autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 46D81BC69 for ; Mon, 22 Oct 2007 21:05:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAO+RHEfQccgFfWdsb2JhbACCPjSKQ4EiAQEJBAYCDxEH X-IronPort-AV: E=Sophos;i="4.21,312,1188770400"; d="scan'208,217";a="3498140" Received: from lax-green-bigip-5.dreamhost.com (HELO looneymail-a1.g.dreamhost.com) ([208.113.200.5]) by mail1-smtp-roc.national.inria.fr with ESMTP; 22 Oct 2007 21:05:58 +0200 Received: from carols-computer-3.local (unknown [74.202.102.226]) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id 6FC7D15F455; Mon, 22 Oct 2007 12:05:55 -0700 (PDT) Message-ID: <471CF48F.4050205@fischerventure.com> Date: Mon, 22 Oct 2007 14:05:51 -0500 From: Robert Fischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Orlin Grigorov Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to monitor a specific file for changes References: In-Reply-To: Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 improper:01 beginner's:01 ocaml:01 bug:01 monitors:98 beginners:01 beginners:01 wrote:01 caml-list:01 caml-list:01 posix:01 bin:01 bin:01 caml:02 I don't think there's an operating-specific signal/event for this: you can poll the modification time on POSIX systems, though.

~~ Robert.

Orlin Grigorov wrote:
Hi.

This time I've done my research, but still I cannot find a good answer.   Basically, I need to make a little ocaml process, which runs in the background and monitors a specific file for changes.   When a change occurs, I want it to back-up a copy of the version of the file at that moment.    So, what I need is to set some signal or event, which will happen every time that file is changed.

Can you guys help me do it?

Thank you in advance!

Orlin

PS. If in any way I'm misusing this list (writing too much, or out of topic), please tell me, because I just don't know it.  The least I want is to spam the list with improper questions.

_______________________________________________ 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