Re: New extension: Inotify

From: Date: Fri, 04 Jul 2008 08:00:49 +0000
Subject: Re: New extension: Inotify
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5596@lists.php.net to get a copy of this message
The only serious problem I see: PHP License is not compatible with GPL, and lnotify is a part of Linux kernel, which is GPL-licensed. Which means, that this extension can't be part of pecl. There were previous talks about making separate extension-repository for GPL-based extensions, but those never resulted in action, as far as I remember. On Fri, Jul 4, 2008 at 9:59 AM, Arnaud.lb <arnaud.lb@gmail.com> wrote: > Hi, > > I have written an extension for the Linux' Inotify API: > http://en.wikipedia.org/wiki/Inotify > > The extension exposes the inotify functions inotify_init(), > inotify_add_watch() and inotify_rm_watch(). > > As the C inotify_init() function returns a file descriptor, PHP's > inotify_init() returns a stream resource, so you can use the standard > stream functions on it, like stream_select(), stream_set_blocking(), > and also fclose(), used to close an inotify instance and all its > watches. > > It also exports two additional functions: > > inotify_queue_len(resource $inotify_instance), which returns a number > upper than zero if their are waiting events > > inotify_read(resource $inotify_instance), which replaces the C way > of reading inotify events. It returns arrays of events, in which keys > represents the members of the inotify_event structure. > > The code can be found here, released under the PHP license: > http://php-inotify.s3.amazonaws.com/php-inotify-0.1.tar.bz2 > > Regards, > > Arnaud > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

« previous php.pecl.dev (#5596) next »