Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25355 invoked from network); 15 Feb 2013 13:52:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2013 13:52:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.12.24 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.12.24 host1.trois-doubles.net Linux 2.6 Received: from [95.130.12.24] ([95.130.12.24:46919] helo=host1.trois-doubles.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/43-06160-8AD3E115 for ; Fri, 15 Feb 2013 08:52:43 -0500 Received: from Hwhost2.local (158-63.203-62.cust.bluewin.ch [62.203.63.158]) by host1.trois-doubles.net (Postfix) with ESMTPSA id 3594C20A9D2 for ; Fri, 15 Feb 2013 14:52:36 +0100 (CET) Message-ID: <511E3DA3.9000900@hoa-project.net> Date: Fri, 15 Feb 2013 14:52:35 +0100 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Thunderbird/20.0a2 MIME-Version: 1.0 To: internals@lists.php.net References: <511CEEB1.7040303@hoa-project.net> <511D5924.4070602@sugarcrm.com> <511E3305.2020506@hoa-project.net> <511E370E.3080709@hoa-project.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] File system watcher/monitoring From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") On 15/02/13 14:29, Sebastian Krebs wrote: > 2013/2/15 Ivan Enderlin @ Hoa > >> On 15/02/13 14:20, Sebastian Krebs wrote: >> >>> 2013/2/15 Ivan Enderlin @ Hoa >>> >>> Hi Stas, >>>> >>>> On 14/02/13 22:37, Stas Malyshev wrote: >>>> >>>> Hi! >>>>> A missing feature in PHP is a file system watcher/monitoring ava= ilable >>>>> >>>>>> for almost all platforms. On Linux, we have inotify (available in = PHP >>>>>> through pecl/inotify), on Mac OS X, we have /dev/fsevents (not >>>>>> available >>>>>> in PHP, since we need ioctl to do that in pure PHP =97and sudo=97,= no C >>>>>> extension needed), on FreeBSD, we have FAM, and on Windows, we hav= e >>>>>> FileSystemWatcher in .NET. All major platforms have a solution rea= dy to >>>>>> use. >>>>>> >>>>>> I think it'd be great to have a library with unified interface a= nd an >>>>> extension that uses it. However, I'm not sure if these libraries ar= e >>>>> useful in common php use case - short-lived requests. Could I get t= he >>>>> changes since the last request? Or is it useful only for long-runni= ng >>>>> persistent processes? >>>>> >>>>> It is only useful for long-running processes. >>>> For example when you are writting tests: at each modifications, you = would >>>> like to re-run or re-generate tests. In this case, you have a daemon= that >>>> watches files changes and executes a command when needed. >>>> >>>> Why do you need PHP for this? >>> http://stackoverflow.com/**questions/3283228/bash-** >>> execute-script-on-file-save#**answer-3283390 >>> >> I don't understand your point. > > For the use-case you described here a PHP-implementation is not require= d, > because you can use the system-tools to invoke PHPUnit. In fact you don= 't > need a daemon at all ;) It is an example :-). I could reply: why do you need need PHPUnit, there = is so much other tools ;-). Well, you get the point. These is a lot of applications. --=20 Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/