From dviner@yahoo-inc.com Tue Jan 13 14:52:44 2004 Received: with ECARTIS (v1.0.0; list fam); Tue, 13 Jan 2004 14:52:57 -0800 (PST) Received: from mrout2.yahoo.com (mrout2.yahoo.com [216.145.54.172]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0DMqi6H002752 for ; Tue, 13 Jan 2004 14:52:44 -0800 Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by mrout2.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i0DMq426027875 for ; Tue, 13 Jan 2004 14:52:04 -0800 (PST) Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Tue, 13 Jan 2004 14:50:17 -0800 Message-ID: <263A1F717ECDED40AA969F98D1CF122E01A4F0B8@penxng.smca.yahoo.com> From: "Viner, David" To: "'fam@oss.sgi.com'" Subject: fam and logging Date: Tue, 13 Jan 2004 14:50:10 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 206 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam hi, FAM currently has its own logging facility. what do you think of replacing that with log4cpp? http://log4cpp.sourceforge.net/ ? replacing the existing implementation of logging would do a couple of things. First, we could use a logging facility that others (read potential users) are familiar with. Second, it would be one less completely static class in the fam source code. Third, the logging of log4cpp (must like the other log4j implementations) is highly configurable. thoughts ? dave From mraymond@sgi.com Wed Jan 14 10:29:16 2004 Received: with ECARTIS (v1.0.0; list fam); Wed, 14 Jan 2004 10:29:30 -0800 (PST) Received: from tolkor.sgi.com (tolkor.SGI.COM [198.149.18.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0EITG6H002870 for ; Wed, 14 Jan 2004 10:29:16 -0800 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by tolkor.sgi.com (8.12.9/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i0EJmQbS025641 for ; Wed, 14 Jan 2004 13:48:26 -0600 Received: from daisy-e236.americas.sgi.com (daisy-e236.americas.sgi.com [128.162.236.214]) by flecktone.americas.sgi.com (8.12.9/8.12.9/generic_config-1.2) with ESMTP id i0EIT9PW29312200; Wed, 14 Jan 2004 12:29:09 -0600 (CST) Received: from goliath.americas.sgi.com (goliath.americas.sgi.com [128.162.232.85]) by daisy-e236.americas.sgi.com (8.12.9/SGI-server-1.8) with ESMTP id i0EISsoZ3571699; Wed, 14 Jan 2004 12:29:04 -0600 (CST) Received: from goliath.americas.sgi.com by goliath.americas.sgi.com (SGI-8.12.5/SGI-client-1.7) via ESMTP id i0EISh2Q036430; Wed, 14 Jan 2004 12:28:43 -0600 (CST) Received: (from mraymond@localhost) by goliath.americas.sgi.com (SGI-8.12.5/8.12.5/Submit) id i0EISNPr036494; Wed, 14 Jan 2004 12:28:23 -0600 (CST) Date: Wed, 14 Jan 2004 12:28:23 -0600 From: Michael Raymond To: "Viner, David" Cc: "'fam@oss.sgi.com'" Subject: Re: fam and logging Message-ID: <20040114122823.H35958@goliath.americas.sgi.com> References: <263A1F717ECDED40AA969F98D1CF122E01A4F0B8@penxng.smca.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <263A1F717ECDED40AA969F98D1CF122E01A4F0B8@penxng.smca.yahoo.com>; from dviner@yahoo-inc.com on Tue, Jan 13, 2004 at 02:50:10PM -0800 X-archive-position: 207 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: mraymond@sgi.com Precedence: bulk X-list: fam Sounds good to me. Show me a diff and I'll let you check it in. Tomorrow I'll be checking in a few small changes that people have sent me. Michael On Tue, Jan 13, 2004 at 02:50:10PM -0800, Viner, David wrote: > hi, > > FAM currently has its own logging facility. what do you think of replacing > that with log4cpp? http://log4cpp.sourceforge.net/ ? > > replacing the existing implementation of logging would do a couple of > things. First, we could use a logging facility that others (read potential > users) are familiar with. Second, it would be one less completely static > class in the fam source code. Third, the logging of log4cpp (must like the > other log4j implementations) is highly configurable. > > thoughts ? > > dave -- Michael A. Raymond Office: (651) 683-3434 Core OS Scheduling Group Real-Time Lead From q@uni.de Wed Jan 14 11:08:27 2004 Received: with ECARTIS (v1.0.0; list fam); Wed, 14 Jan 2004 11:08:40 -0800 (PST) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0EJ8Q6H003884 for ; Wed, 14 Jan 2004 11:08:27 -0800 Received: from wrzx30.rz.uni-wuerzburg.de (wrzx30.rz.uni-wuerzburg.de [132.187.1.30]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 6EE49AB416; Wed, 14 Jan 2004 20:08:25 +0100 (CET) Received: from virusscan (localhost [127.0.0.1]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id 54EC141D5B; Wed, 14 Jan 2004 20:08:25 +0100 (CET) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id 30EAE41D98; Wed, 14 Jan 2004 20:08:25 +0100 (CET) Received: from coyote.q.local (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 0152BAB416; Wed, 14 Jan 2004 20:08:25 +0100 (CET) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.12.10/8.12.10) with ESMTP id i0EJ8OhS002349; Wed, 14 Jan 2004 20:08:24 +0100 (CET) (envelope-from q@roadrunner.q.local) Received: (from q@localhost) by roadrunner.q.local (8.12.10/8.12.10/Submit) id i0EJ8NnZ002348; Wed, 14 Jan 2004 20:08:23 +0100 (CET) (envelope-from q) Date: Wed, 14 Jan 2004 20:08:23 +0100 From: Ulrich Spoerlein To: "Viner, David" Cc: fam@oss.sgi.com Subject: Re: Fam 2.7.0 crashing on FreeBSD/NFS Message-ID: <20040114190823.GA2287@galgenberg.net> References: <263A1F717ECDED40AA969F98D1CF122E01A4F0C4@penxng.smca.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <263A1F717ECDED40AA969F98D1CF122E01A4F0C4@penxng.smca.yahoo.com> X-No-Archive: yes User-Agent: Mutt/1.5.5.1i X-Virus-Scanned: by amavisd-new (Rechenzentrum Universitaet Wuerzburg) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i0EJ8Q6H003884 X-archive-position: 208 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: q@uni.de Precedence: bulk X-list: fam On Wed, 14.01.2004 at 10:39:32 -0800, Viner, David wrote: > is this still happening? > i haven't tried 2.7.0 on my fbsd yet. > > does it work on fbsd if used in Local mode (non-nfs)? Initially I thought it was working, but looks like it doesn't! I fired up kmplayer under root (so $HOME is on a local FS). And the assertion is still not valid. Since I'm fairly busy with other work I haven't yet looked further into the issue. Once I have time I will poke around in the source code. Ulrich Spörlein -- PGP Key ID: F0DB9F44 Get it while it's hot! PGP Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 I abhor a system designed for the "user", if that word is a coded pejorative meaning "stupid and unsophisticated". -- Ken Thompson From dviner@yahoo-inc.com Wed Jan 14 11:23:09 2004 Received: with ECARTIS (v1.0.0; list fam); Wed, 14 Jan 2004 11:23:25 -0800 (PST) Received: from mrout2.yahoo.com (mrout2.yahoo.com [216.145.54.172]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0EJN86H004241 for ; Wed, 14 Jan 2004 11:23:09 -0800 Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by mrout2.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i0EJKw26016794; Wed, 14 Jan 2004 11:20:58 -0800 (PST) Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Wed, 14 Jan 2004 11:19:11 -0800 Message-ID: <263A1F717ECDED40AA969F98D1CF122E01A4F0C5@penxng.smca.yahoo.com> From: "Viner, David" To: "'Ulrich Spoerlein'" Cc: fam@oss.sgi.com Subject: RE: Fam 2.7.0 crashing on FreeBSD/NFS Date: Wed, 14 Jan 2004 11:19:10 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i0EJN86H004241 X-archive-position: 209 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam does 2.7.0 compile on freebsd out of the box? or do we still need to apply the freebsd ports patches to it? dave -----Original Message----- From: Ulrich Spoerlein [mailto:q@uni.de] Sent: Wednesday, January 14, 2004 11:08 AM To: Viner, David Cc: fam@oss.sgi.com Subject: Re: Fam 2.7.0 crashing on FreeBSD/NFS On Wed, 14.01.2004 at 10:39:32 -0800, Viner, David wrote: > is this still happening? > i haven't tried 2.7.0 on my fbsd yet. > > does it work on fbsd if used in Local mode (non-nfs)? Initially I thought it was working, but looks like it doesn't! I fired up kmplayer under root (so $HOME is on a local FS). And the assertion is still not valid. Since I'm fairly busy with other work I haven't yet looked further into the issue. Once I have time I will poke around in the source code. Ulrich Spörlein -- PGP Key ID: F0DB9F44 Get it while it's hot! PGP Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 I abhor a system designed for the "user", if that word is a coded pejorative meaning "stupid and unsophisticated". -- Ken Thompson From dviner@yahoo-inc.com Wed Jan 14 11:47:48 2004 Received: with ECARTIS (v1.0.0; list fam); Wed, 14 Jan 2004 11:48:03 -0800 (PST) Received: from mrout2.yahoo.com (mrout2.yahoo.com [216.145.54.172]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0EJlm6H005246 for ; Wed, 14 Jan 2004 11:47:48 -0800 Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by mrout2.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i0EJkm26023010 for ; Wed, 14 Jan 2004 11:46:48 -0800 (PST) Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Wed, 14 Jan 2004 11:45:01 -0800 Message-ID: <263A1F717ECDED40AA969F98D1CF122E01A4F0CA@penxng.smca.yahoo.com> From: "Viner, David" To: "'fam@oss.sgi.com'" Subject: compiling fam Date: Wed, 14 Jan 2004 11:45:00 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 210 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam I'm trying to compile fam on my machine. from the INSTALL file http://cvs.sourceforge.net/viewcvs.py/fam/fam/INSTALL?rev=1.2&view=auto, i should just run configure. However, this configure script may or may not be properly configured for my machine... for example, the configure.ac file http://cvs.sourceforge.net/viewcvs.py/fam/fam/configure.ac?rev=1.1&view=auto says that we should process it with autoconf to *produce* the configure script appropriate to my machine. i'm not terribly good with autoconf and the similar tools, but shouldn't the compilation directions be something more like: autoconf ./configure make ? dave From dviner@yahoo-inc.com Tue Jan 20 14:18:18 2004 Received: with ECARTIS (v1.0.0; list fam); Tue, 20 Jan 2004 14:18:31 -0800 (PST) Received: from mrout2.yahoo.com (mrout2.yahoo.com [216.145.54.172]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0KMIImK028903 for ; Tue, 20 Jan 2004 14:18:18 -0800 Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by mrout2.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i0KMFx26041546; Tue, 20 Jan 2004 14:15:59 -0800 (PST) Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Tue, 20 Jan 2004 14:14:10 -0800 Message-ID: <263A1F717ECDED40AA969F98D1CF122E01A4F11B@penxng.smca.yahoo.com> From: "Viner, David" To: "'Danny Milosavljevic'" Cc: "'fam@oss.sgi.com'" Subject: RE: compiling fam Date: Tue, 20 Jan 2004 14:14:08 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 211 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam here's my info: %automake --version automake (GNU automake) 1.4-p5 %autoconf --version Autoconf version 2.13 %aclocal --version aclocal (GNU automake) 1.4-p5 aclocal runs fine. automake has this error: %automake configure.ac: 9: required file `./[config.h].in' not found conf/Makefile.am:3: invalid variable `dist_sysconf_DATA' trying autoconf anyway produces this output: % autoconf autoconf: configure.in: No such file or directory due to some sad constraints, i can't get autoconf 2.57 or higher installed on my machine (php requires 2.13). is there any chance we can reduce the autoconf prereq to 2.13? dave -----Original Message----- From: Danny Milosavljevic [mailto:danny.milo@gmx.net] Sent: Saturday, January 17, 2004 4:00 AM To: Viner, David Subject: RE: compiling fam Hi, Am Sam, den 17.01.2004 schrieb Viner, David um 01:53: > ok... so the goal here is to run: > aclocal > autoconf > automake aclocal, then automake, then autoconf :) [except for the very first time the project is created, but thats beside the point :)] > > ./configure > make > > steps 1-3 are done only by developers before release. > > from reading > http://sources.redhat.com/autobook/autobook/autobook_24.html#SEC24 it looks > like we need a configure.in to be used by autoconf. But our cvs doesn't > have this: http://cvs.sourceforge.net/viewcvs.py/fam/fam/ > > so, when I run autoconf, i just get: > >autoconf > autoconf: configure.in: No such file or directory Hmm, "aclocal", "automake", "autoconf" works fine here... afaik autoconf needs either configure.ac *or* configure.in and Makefile.in to generate the configure script. For reference, I have aclocal 1.7.8, automake 1.7.8, autoconf 2.58 The fam stuff in cvs seems to have been generated by automake 1.6.3... it works fine with my versions though... (checked out fam cvs, ran aclocal-1.7, automake-1.7, autoconf-1.7, ./configure, make, and apart from loads of "old c++" warnings, it works just fine) So in an attempt to remember how it was: aclocal: input: configure.ac, m4 output: aclocal.m4 automake: input: aclocal.m4, configure.ac, optional config.h.in output: (loads of aux files like install-sh,...), Makefile.in autoconf: input: Makefile.in?, optional config.h.in output: configure --- configure: input: config.h.in, Makefile.in output: config.h, Makefile I *think* it was like that :) Especially the "autoconf" description part is blurry since it never made problems so I never needed to know :) > > This seems bad to me. We can't regen the configure script. Is there to > work backwards from a configure to a configure.in? Not that I know of. configure.ac is enough either way since it is the first step (the source). I remember that older versions of automake used to have configure.ac->configure.in->configure instead of configure.ac->configure like it is now... If you happen to have one of these, try cp configure.ac configure.in, maybe it helps... Though I enter the world of speculation here, since I cant remember what configure.in was at all... and it is not created in the test cvs fam co I compiled either (which works fine without it), so hey :) cheers, Danny From rodrigo.lists@fabricadeideias.com Mon Jan 26 10:54:12 2004 Received: with ECARTIS (v1.0.0; list fam); Mon, 26 Jan 2004 10:54:25 -0800 (PST) Received: from scorsese.fabricadeideias.com (scorsese.fabricadeideias.com.br [200.157.56.34]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0QIsA7J017721 for ; Mon, 26 Jan 2004 10:54:12 -0800 Received: from fabricadeideias.com (fellini.fabricadeideias.com.br [192.168.109.50]) by scorsese.fabricadeideias.com with esmtp; Mon, 26 Jan 2004 16:52:37 -0200 Message-ID: <40156295.6010107@fabricadeideias.com> Date: Mon, 26 Jan 2004 16:55:17 -0200 From: Rodrigo Severo User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed To: fam@oss.sgi.com Subject: FAM on Linux: IMon or DNotify? X-Mime-Autoconverted: from 8bit to quoted-printable by courier 0.42.2 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i0QIsA7J017721 X-archive-position: 212 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: rodrigo.lists@fabricadeideias.com Precedence: bulk X-list: fam Hi, I would like to know what it the recomemded procedure, Best Practice (tm), for FAM install on Linux: IMon or DNotify? I'm using kernel 2.4.24. TIA, Rodrigo Severo -- ---------------------------------------------------- Rodrigo Severo Fábrica de Idéias Fone: +55(61)321 1357 Fax: +55(61)223 1712 SBS - Quadra 2 - Ed. Empire Center - Sala 1301 Brasília/DF - Brasil CEP: 70.070-904 ---------------------------------------------------- From system@autocontactor.com Mon Jan 26 19:27:05 2004 Received: with ECARTIS (v1.0.0; list fam); Mon, 26 Jan 2004 19:27:17 -0800 (PST) Received: from mail213.autocontactor.com (mail213.autocontactor.com [66.70.75.213]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0R3R37J017036 for ; Mon, 26 Jan 2004 19:27:04 -0800 XMailer: StrongMail 1.13.13 XMailing-Id: 00000::00000::00000::00000::mc:optina1:34129:26725:17201507 X-Destination-ID: X-VirtualServer: mail213.autocontactor.com, 66.70.75.213 Message-ID: <1075173757.> Message-ID: <265430-22004122733412546@mail3.autocontactor.com> Reply-To: allenjesson@bigpond.com From: "A Gift Of Poetry" x-1scdbg: mc:optina1:34129:26725:17201507 X-SentTo: "fam@oss.sgi.com" To: fam@oss.sgi.com Subject: Please confirm your subscription. Date: Mon, 26 Jan 2004 22:34:12 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-archive-position: 213 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: allenjesson@bigpond.com Precedence: bulk X-list: fam Hi , It's A Gift Of Poetry writing you to confirm your subscription to our mailing list. You can confirm your subscription by simply clicking the link below: https://www.mcssl.com/app/optin.asp?j=0&c=17201507&pg=das&nc=1 If you received this message in error, or do not wish to be included in future mailings, you do not have to do anything Simply, delete the message and your information will be removed by our system automatically. You can contact us at allenjesson@bigpond.com, for more information on our service. Regards, A Gift Of Poetry From rodrigo.lists@fabricadeideias.com Fri Jan 30 09:56:38 2004 Received: with ECARTIS (v1.0.0; list fam); Fri, 30 Jan 2004 09:56:51 -0800 (PST) Received: from scorsese.fabricadeideias.com (scorsese.fabricadeideias.com.br [200.157.56.34]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0UHua7J014784 for ; Fri, 30 Jan 2004 09:56:37 -0800 Received: from fabricadeideias.com (fellini.fabricadeideias.com.br [192.168.109.50]) by scorsese.fabricadeideias.com with esmtp; Fri, 30 Jan 2004 15:55:16 -0200 Message-ID: <401A9B2D.9000001@fabricadeideias.com> Date: Fri, 30 Jan 2004 15:58:05 -0200 From: Rodrigo Severo User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed To: fam@oss.sgi.com Subject: FAM 2.7.0 on Linux 2.4.24: neither IMon nor DNotify X-Mime-Autoconverted: from 8bit to quoted-printable by courier 0.42.2 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i0UHua7J014784 X-archive-position: 214 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: rodrigo.lists@fabricadeideias.com Precedence: bulk X-list: fam Hi, I'm just trying to install FAM 2.7.0 on Linux 2.4.24. I tried to apply imon-0.0.2-2.4.17 patch to kernel 2.4.24 without success: several failed hunks. Then I tried to apply the dnotify-2.6.7.patch to FAM 2.7.0 with a few failed. Can't apply because it tried to patch inexistent files. What shall I do? Is FAM innusable in Linux right now? Thanks in advance for your attention, Rodrigo Severo -- ---------------------------------------------------- Rodrigo Severo Fábrica de Idéias Fone: +55(61)321 1357 Fax: +55(61)223 1712 SBS - Quadra 2 - Ed. Empire Center - Sala 1301 Brasília/DF - Brasil CEP: 70.070-904 ---------------------------------------------------- From jorgland@sol.wh-hms.uni-ulm.de Fri Jan 30 13:38:36 2004 Received: with ECARTIS (v1.0.0; list fam); Fri, 30 Jan 2004 13:38:40 -0800 (PST) Received: from sol.wh-hms.uni-ulm.de (sol.wh-hms.uni-ulm.de [134.60.220.1]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i0ULcY7J026952 for ; Fri, 30 Jan 2004 13:38:34 -0800 Received: (qmail 31869 invoked by uid 3342); 30 Jan 2004 21:38:32 -0000 Date: Fri, 30 Jan 2004 22:38:32 +0100 From: Joerg Wendland To: Rodrigo Severo Cc: fam@oss.sgi.com Subject: Re: FAM 2.7.0 on Linux 2.4.24: neither IMon nor DNotify Message-ID: <20040130213832.GL11887@sol.wh-hms.uni-ulm.de> References: <401A9B2D.9000001@fabricadeideias.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ABYnUdqoGSokwVM+" Content-Disposition: inline In-Reply-To: <401A9B2D.9000001@fabricadeideias.com> User-Agent: Mutt/1.5.4i X-archive-position: 215 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: joergland@debian.org Precedence: bulk X-list: fam --ABYnUdqoGSokwVM+ Content-Type: multipart/mixed; boundary="4OpS+d6oOtUQaRm1" Content-Disposition: inline --4OpS+d6oOtUQaRm1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Rodrigo Severo, on 2004-01-30, 15:58, you wrote: > Then I tried to apply the dnotify-2.6.7.patch to FAM 2.7.0 with a few=20 > failed. Can't apply because it tried to patch inexistent files. This patch applies to 2.7.0, I just finished it for my Debian packages. HTH, Joerg --=20 Joerg "joergland" Wendland GPG: 51CF8417 FP: 79C0 7671 AFC7 315E 657A F318 57A3 7FBD 51CF 8417 --4OpS+d6oOtUQaRm1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="01_dnotify.patch" Content-Transfer-Encoding: quoted-printable --- fam-2.7.0/src/DNotify.c++ 2004-01-30 00:00:00.000000000 +0100 +++ fam-2.7.0.dnotify/src/DNotify.c++ 2004-01-30 00:00:00.000000000 +0100 @@ -0,0 +1,582 @@ +// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. +// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. +// =20 +// This program is free software; you can redistribute it and/or modify it +// under the terms of version 2 of the GNU General Public License as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it would be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any +// license provided herein, whether implied or otherwise, is limited to +// this program in accordance with the express provisions of the GNU +// General Public License. Patent licenses, if any, provided herein do n= ot +// apply to combinations of this program with other product or programs, = or +// any other product whatsoever. This program is distributed without any +// warranty that the program is delivered free of the rightful claim of a= ny +// third person by way of infringement or the like. See the GNU General +// Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write the Free Software Foundation, Inc., 59 +// Temple Place - Suite 330, Boston MA 02111-1307, USA. + +#define _GNU_SOURCE =20 +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "DNotify.h" + +#include "Interest.h" +#include "Log.h" +#include "Scheduler.h" +#include + + +int DNotify::pipe_write_fd =3D -2; +int DNotify::pipe_read_fd =3D -2; +volatile sig_atomic_t DNotify::queue_overflowed =3D 0; +volatile sig_atomic_t DNotify::queue_changed =3D 0; +int DNotify::change_queue[QUEUESIZE]; +volatile int DNotify::queue_head =3D 0; // Only modified by read handler +volatile int DNotify::queue_tail =3D 0; // Only modified by signal handler +DNotify::EventHandler DNotify::ehandler; + +DNotify::DirWatch *DNotify::dir_hash[DIR_HASHSIZE]; +DNotify::FileWatch *DNotify::file_hash[FILE_HASHSIZE]; + +struct DNotify::FileWatch +{ + DirWatch *dir_watch; + dev_t file_dev; + ino_t file_ino; + FileWatch *next; // The DirWatch.watches list + FileWatch *hash_link; +}; + +struct DNotify::DirWatch +{ + int fd; + dev_t dir_dev; + ino_t dir_ino; + =20 + DirWatch *hash_link; + FileWatch *watches; +}; + +struct DNotify::ChangeEventData +{ + dev_t file_dev; + ino_t file_ino; +}; =20 + +DNotify::DNotify(EventHandler h) +{ + assert(ehandler =3D=3D NULL); + ehandler =3D h; +} + +DNotify::~DNotify() +{ + if (pipe_read_fd >=3D 0) + { + // Tell the scheduler. + + (void) Scheduler::remove_read_handler(pipe_read_fd); + + // Close the pipe. + + if (close(pipe_read_fd) < 0) + Log::perror("can't pipe read end"); + else + Log::debug("closed pipe read end"); +=09 + if (close(pipe_write_fd) < 0) + Log::perror("can't pipe write end"); + else + Log::debug("closed pipe write end"); + pipe_read_fd =3D -1; + } + ehandler =3D NULL; +} + +void +DNotify::overflow_signal_handler(int sig, siginfo_t *si, void *data) +{ + char c =3D 'x'; + + { + char *str =3D "*************** overflow sigqueue *********************= **\n"; + write (STDERR_FILENO, str, strlen(str)); + } + + if (!queue_overflowed) + { + queue_overflowed =3D 1; + // Trigger the read handler + write(pipe_write_fd, &c, 1); + } +} + +void +DNotify::signal_handler(int sig, siginfo_t *si, void *data) +{ + int left; + char c =3D 'x'; + + if (queue_head <=3D queue_tail) + left =3D (QUEUESIZE + queue_head) - queue_tail; + else=20 + left =3D queue_head - queue_tail; + =20 + // Must leave at least one item unused to see difference + // Betweeen empty and full + if (left <=3D 1) + { + queue_overflowed =3D 1; + { + char *str =3D "*************** overflow famqueue ****************\n"; + write (STDERR_FILENO, str, strlen(str)); + } + } + else + { + change_queue[queue_tail] =3D si->si_fd; + queue_tail =3D (queue_tail + 1) % QUEUESIZE; + } + =20 + if (!queue_changed) + { + queue_changed =3D 1; + // Trigger the read handler + write(pipe_write_fd, &c, 1); + } +} + +bool +DNotify::is_active() +{ + if (pipe_read_fd =3D=3D -2) + { + int filedes[2]; + int res; +=09 + res =3D pipe (filedes); + if (res >=3D 0) + { Log::debug("opened pipe"); + pipe_read_fd =3D filedes[0]; + pipe_write_fd =3D filedes[1]; + + // Setup signal handler: + struct sigaction act; + =20 + act.sa_sigaction =3D signal_handler; + sigemptyset(&act.sa_mask); + act.sa_flags =3D SA_SIGINFO; + sigaction(SIGRTMIN, &act, NULL); + + // When the RT queue overflows we get a SIGIO + act.sa_sigaction =3D overflow_signal_handler; + sigemptyset(&act.sa_mask); + sigaction(SIGIO, &act, NULL); + + (void) Scheduler::install_read_handler(pipe_read_fd, read_handler, NU= LL); + } + } + return pipe_read_fd >=3D 0; +} + +DNotify::DirWatch * +DNotify::lookup_dirwatch (int fd) +{ + DirWatch **p; + DirWatch *w; + + p =3D dir_hashchain (fd); + + while (*p) + { + w =3D *p; + + if (w->fd =3D=3D fd) + return w; + + p =3D &w->hash_link; + } + =20 + return *p; +} + +// This colud be made faster by using another hash table. +// But it's not that bad, since it is only used by express/revoke +DNotify::DirWatch * +DNotify::lookup_dirwatch (dev_t dir_dev, ino_t dir_ino) +{ + DirWatch *p; + int i; + + for (i=3D0;idir_dev =3D=3D dir_dev && p->dir_ino =3D=3D dir_ino) + return p; + =20 + p =3D p->hash_link; + } + } + =20 + return NULL; +} + +DNotify::FileWatch * +DNotify::lookup_filewatch (dev_t dev, ino_t ino) +{ + FileWatch **p; + FileWatch *w; + + p =3D file_hashchain (dev, ino); + + while (*p) + { + w =3D *p; + + if (w->file_dev =3D=3D dev && w->file_ino =3D=3D ino) + return w; + + p =3D &w->hash_link; + } + =20 + return *p; +} + +// Make sure w is not already in the hash table before calling +// this function. +void +DNotify::hash_dirwatch(DirWatch *w) +{ + DirWatch **p; + p =3D dir_hashchain (w->fd); + w->hash_link =3D *p; + *p =3D w; +} + +// Make sure w is not already in the hash table before calling +// this function. +void +DNotify::hash_filewatch(FileWatch *w) +{ + FileWatch **p; + p =3D file_hashchain (w->file_dev, w->file_ino); + w->hash_link =3D *p; + *p =3D w; +} + +void +DNotify::unhash_dirwatch(DirWatch *w) +{ + DirWatch **p; + =20 + p =3D dir_hashchain (w->fd); + =20 + while (*p) + { + if (*p =3D=3D w) + { + *p =3D w->hash_link; + break; + } + p =3D &(*p)->hash_link; + } + w->hash_link =3D NULL; +} + +void +DNotify::unhash_filewatch(FileWatch *w) +{ + FileWatch **p; + =20 + p =3D file_hashchain (w->file_dev, w->file_ino); + =20 + while (*p) + { + if (*p =3D=3D w) + { + *p =3D w->hash_link; + break; + } + p =3D &(*p)->hash_link; + } + w->hash_link =3D NULL; +} + +DNotify::Status +DNotify::watch_dir(const char *notify_dir, dev_t file_dev, ino_t file_ino) +{ + struct stat stat; + dev_t dir_dev; + ino_t dir_ino; + DirWatch *dwatch; + FileWatch *fw; + =20 + if (lstat (notify_dir, &stat) =3D=3D -1) + return BAD; + =20 + dwatch =3D lookup_dirwatch(stat.st_dev, stat.st_ino); + if (!dwatch) + { + Log::debug ("New DirWatch for %s (%x %x)\n", + notify_dir, (int)stat.st_dev, (int)stat.st_ino); + dwatch =3D new DirWatch; + dwatch->watches =3D NULL; + dwatch->hash_link =3D NULL; + dwatch->dir_dev =3D stat.st_dev; + dwatch->dir_ino =3D stat.st_ino; + =20 + dwatch->fd =3D open(notify_dir, O_RDONLY); + fcntl (dwatch->fd, F_SETSIG, SIGRTMIN); + if (fcntl (dwatch->fd, F_NOTIFY, + (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB)=20 + | DN_MULTISHOT) =3D=3D -1) { + return BAD; + } + hash_dirwatch (dwatch); + } + + fw =3D lookup_filewatch (file_dev, file_ino); + if (fw && fw->dir_watch =3D=3D dwatch) + return OK; + =20 + // No old FileWatch, need to add one: + Log::debug("New FileWatch for %x %x\n", (int)file_dev, (int)file_ino); + fw =3D new FileWatch; + fw->next =3D dwatch->watches; + dwatch->watches =3D fw; + fw->file_dev =3D file_dev; + fw->file_ino =3D file_ino; + fw->dir_watch =3D dwatch; + hash_filewatch(fw); + return OK; +} + +char * +dirname_dup (const char *name) +{ + char *copy =3D strdup(name); + char *res =3D dirname(copy); + res =3D strdup(res); + free (copy); + return res; +} + +DNotify::Status +DNotify::express(const char *name, struct stat *status) +{ + struct stat stat; + char *notify_dir; + int res; + Status s; + dev_t dev; + ino_t ino; + + Log::debug("express() name: %s\n", name); + + if (!is_active()) + return BAD; + + if (::lstat (name, &stat) =3D=3D -1) + return BAD; + + dev =3D stat.st_dev; + ino =3D stat.st_ino; + =20 + if ((stat.st_mode & S_IFMT) !=3D S_IFDIR) + notify_dir =3D dirname_dup (name); + else + notify_dir =3D (char *)name; + + s =3D watch_dir (notify_dir, dev, ino); + if (notify_dir !=3D name) + free (notify_dir); + if (s) + return s; + + // Check for a race condition; if someone removed or changed the + // file at the same time that we are expressing interest in it, + // revoke the interest so we don't get notifications about changes + // to a recycled inode that we don't otherwise care about. + // + struct stat st; + if (status =3D=3D NULL) { + status =3D &st; + } + if (::lstat(name, status) =3D=3D -1) { + Log::perror("stat on \"%s\" failed", name); + revoke(name, stat.st_dev, stat.st_ino); + return BAD; + } + if (status->st_dev !=3D stat.st_dev + || status->st_ino !=3D stat.st_ino) { + Log::error("File \"%s\" changed between express and stat", + name); + revoke(name, stat.st_dev, stat.st_ino); + return BAD; + }=09 + + Log::debug("told dnotify to monitor \"%s\" =3D dev %d/%d, ino %d", nam= e, + major(status->st_dev), minor(status->st_dev), + status->st_ino); + return OK; +} + +DNotify::Status +DNotify::revoke(const char *name, dev_t dev, ino_t ino) +{ + FileWatch *fwatch; + DirWatch *dwatch; + =20 + Log::debug("revoke() name: %s, dev: %x, ino: %x\n", name, dev, ino); + + if (!is_active()) + return BAD; + + // Lookup FileWatch by dev:ino, and its DirWatch. + fwatch =3D lookup_filewatch (dev, ino); + if (fwatch =3D=3D NULL) + return BAD; + =20 + dwatch =3D fwatch->dir_watch; + =20 + // delete FileWatch, if last FileWatch: close fd, delete DirWatch + Log::debug ("Destroying FileWatch for (%x %x)\n", + (int)fwatch->file_dev, (int)fwatch->file_ino); + FileWatch **p; + for (p=3D&dwatch->watches; *p; p=3D&(*p)->next) + { + if (*p =3D=3D fwatch) + { + *p =3D (*p)->next; + break; + } + } + unhash_filewatch(fwatch); + delete fwatch; + if (dwatch->watches =3D=3D NULL) + { + Log::debug ("Destroying DirWatch for (%x %x)\n", + (int)dwatch->dir_dev, (int)dwatch->dir_ino); + close(dwatch->fd); + unhash_dirwatch(dwatch); + delete dwatch; + } + =20 + return OK; +} + + +void +DNotify::all_watches_changed(void) +{ + int i; + FileWatch *fw; + + for (i=3D0; ifile_dev, fw->file_ino, CHANGE); + + fw =3D fw->hash_link; + } + } +} + + +void +DNotify::read_handler(int fd, void *) +{ + static char readbuf[5000]; + DirWatch *dw; + FileWatch *fw; + int snap_queue_tail; + int last_fd; + + int rc =3D read(fd, readbuf, sizeof readbuf); + queue_changed =3D 0; + if (rc < 0) + Log::perror("pipe read"); + else if (queue_overflowed) + { + // There is a *slight* race condition here. Between reading + // the queue_overflow flag and resetting it. But it doesn't + // matter, since I'm gonna handle the overflow after reseting + // anyway. + queue_overflowed =3D false; + + // We're soon gonna check all watches anyway, so + // get rid of the current queue + queue_head =3D queue_tail; + =20 + all_watches_changed (); + } + else + { + // Don't read events that happen later than + // the initial read. (Otherwise skipping fd's + // might miss some changes). + snap_queue_tail =3D queue_tail; + last_fd =3D -1; + while (queue_head !=3D snap_queue_tail) + { + fd =3D change_queue[queue_head]; + queue_head =3D (queue_head + 1) % QUEUESIZE; + + // Skip multiple changes to the same fd + if (fd !=3D last_fd) + { + dw =3D lookup_dirwatch (fd); + if (dw) + { + int n_watches, i; + ChangeEventData *data; + =20 + Log::debug("dnotify said dev %d/%d, ino %ld changed", + major(dw->dir_dev), minor(dw->dir_dev), dw->dir_ino); + =20 + n_watches =3D 0; + for (fw=3Ddw->watches; fw; fw=3Dfw->next) + n_watches++; + =20 + data =3D new ChangeEventData[n_watches]; + + i =3D 0; + for (fw=3Ddw->watches; fw; fw=3Dfw->next) + { + data[i].file_dev =3D fw->file_dev; + data[i].file_ino =3D fw->file_ino; + i++; + } + + for (i =3D 0; i < n_watches; i++) + { + (*ehandler)(data[i].file_dev, data[i].file_ino, CHANGE); + } + =20 + delete[] data; + } + } + last_fd =3D fd; + } + } +} + --- fam-2.7.0/src/DNotify.h 2004-01-30 00:00:00.000000000 +0100 +++ fam-2.7.0.dnotify/src/DNotify.h 2004-01-30 00:00:00.000000000 +0100 @@ -0,0 +1,98 @@ +// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. +// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. +// +// This program is free software; you can redistribute it and/or modify it +// under the terms of version 2 of the GNU General Public License as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it would be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any +// license provided herein, whether implied or otherwise, is limited to +// this program in accordance with the express provisions of the GNU +// General Public License. Patent licenses, if any, provided herein do n= ot +// apply to combinations of this program with other product or programs, = or +// any other product whatsoever. This program is distributed without any +// warranty that the program is delivered free of the rightful claim of a= ny +// third person by way of infringement or the like. See the GNU General +// Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write the Free Software Foundation, Inc., 59 +// Temple Place - Suite 330, Boston MA 02111-1307, USA. + +#ifndef DNotify_included +#define DNotify_included + +#include "config.h" +#include "Monitor.h" +#include + +// DNotify is an object encapsulating the dnotify linux fcntl. +// It "emulates" the IMon interface. +// There can only be one instantiation of the DNotify object. +// +// The user of this object uses express() and revoke() to +// express/revoke interest in a file. There is also +// a callback, the EventHandler. When an dnotify event comes in, +// the EventHandler is called. +// +// The user of the DNotify object is the Interest class. + +class DNotify : public Monitor { +public: + DNotify(EventHandler h); + ~DNotify(); + + static bool is_active(); + + virtual Status express(const char *name, struct stat *stat_return); + virtual Status revoke(const char *name, dev_t dev, ino_t ino); + +private: + struct FileWatch; + struct DirWatch; + struct ChangeEventData; + =20 + // Class Variables + enum { QUEUESIZE =3D 1024 }; + static int pipe_write_fd; + static int pipe_read_fd; + static int change_queue[QUEUESIZE]; + static volatile sig_atomic_t DNotify::queue_overflowed; + static volatile sig_atomic_t DNotify::queue_changed; + static volatile int queue_head; // Only modified by read handler + static volatile int queue_tail; // Only modified by signal handler + static EventHandler ehandler; + static void overflow_signal_handler(int sig, siginfo_t *si, void *data= ); + static void signal_handler(int sig, siginfo_t *si, void *data); + static void read_handler(int fd, void *closure); +=20 + enum { DIR_HASHSIZE =3D 367 }; + static DirWatch *dir_hash[DIR_HASHSIZE]; + enum { FILE_HASHSIZE =3D 823 }; + static FileWatch *file_hash[FILE_HASHSIZE]; + + static DirWatch **dir_hashchain(int fd) + { return &dir_hash[(unsigned) (fd) % DIR_HASHSIZE]; } + static FileWatch **file_hashchain(dev_t d, ino_t i) + { return &file_hash[(unsigned) (d+i) % FILE_HASHSIZE]; } + + static DirWatch *lookup_dirwatch (int fd); + static DirWatch *lookup_dirwatch (dev_t dir_dev, ino_t dir_ino); + static FileWatch *lookup_filewatch (dev_t file_dev, ino_t file_ino); + static void hash_dirwatch(DirWatch *w); + static void hash_filewatch(FileWatch *w); + static void unhash_dirwatch(DirWatch *w); + static void unhash_filewatch(FileWatch *w); + static Status watch_dir(const char *notify_dir, dev_t file_dev, ino_t = file_ino); + + static void all_watches_changed(void); + =20 + DNotify(const DNotify&); // Do not copy + DNotify & operator =3D (const DNotify&); // or assign. +}; + +#endif /* !IMon_included */ + + --- fam-2.7.0/src/Interest.c++ 2004-01-30 00:00:00.000000000 +0100 +++ fam-2.7.0.dnotify/src/Interest.c++ 2004-01-30 00:00:00.000000000 +0100 @@ -42,12 +42,21 @@ #include "Event.h" #include "FileSystem.h" #include "IMon.h" +#include "DNotify.h" #include "Log.h" #include "Pollster.h" #include "timeval.h" =20 Interest *Interest::hashtable[]; -IMon Interest::imon(imon_handler); + +#ifdef USE_DNOTIFY=20 +static DNotify dnotify(Interest::monitor_handler); +Monitor * Interest::monitor =3D &dnotify; +#else +static IMon imon(Interest::monitor_handler); +Monitor * Interest::monitor =3D &imon; +#endif + bool Interest::xtab_verification =3D true; =20 Interest::Interest(const char *name, FileSystem *fs, in_addr host, ExportV= erification ev) @@ -60,10 +69,10 @@ mypath_exported_to_host(ev =3D=3D NO_VERIFY_EXPORTED) { memset(&old_stat, 0, sizeof(old_stat));=20 - IMon::Status s =3D IMon::BAD; =20 - s =3D imon.express(name, &old_stat); - if (s !=3D IMon::OK) + Monitor::Status s =3D Monitor::BAD; + s =3D monitor->express(name, &old_stat); + if (s !=3D Monitor::OK) { int rc =3D lstat(name, &old_stat); if (rc < 0) { Log::info("can't lstat %s", name); @@ -100,7 +109,7 @@ } #endif =20 - if (exported_to_host()) fs->ll_monitor(this, s =3D=3D IMon::OK); + if (exported_to_host()) fs->ll_monitor(this, s =3D=3D Monitor::OK); } =20 Interest::~Interest() @@ -128,7 +137,7 @@ pp =3D &p->hashlink; // move to next element } if (!found_same) - (void) imon.revoke(name(), dev, ino); + (void) monitor->revoke(name(), dev, ino); } } =20 @@ -147,7 +156,7 @@ =20 // Express interest. IMon::Status s =3D IMon::BAD; - s =3D imon.express(name(), NULL); + s =3D monitor->express(name(), NULL); if (s !=3D IMon::OK) { return true; } @@ -248,23 +257,23 @@ } =20 void -Interest::imon_handler(dev_t device, ino_t inumber, int event) +Interest::monitor_handler(dev_t device, ino_t inumber, int event) { assert(device || inumber); =20 for (Interest *p =3D *hashchain(device, inumber), *next =3D p; p; p = =3D next) { next =3D p->hashlink; if (p->ino =3D=3D inumber && p->dev =3D=3D device) - { if (event =3D=3D IMon::EXEC) + { if (event =3D=3D Monitor::EXEC) { p->cur_exec_state =3D EXECUTING; (void) p->report_exec_state(); } - else if (event =3D=3D IMon::EXIT) + else if (event =3D=3D Monitor::EXIT) { p->cur_exec_state =3D NOT_EXECUTING; (void) p->report_exec_state(); } else - { assert(event =3D=3D IMon::CHANGE); + { assert(event =3D=3D Monitor::CHANGE); p->scan(); } } --- fam-2.7.0/config.h.in 2003-01-20 01:40:15.000000000 +0100 +++ fam-2.7.0.dnotify/config.h.in 2004-01-30 13:50:33.000000000 +0100 @@ -180,3 +180,6 @@ =20 /* Define to `int' if doesn't define. */ #undef uid_t + +/* Define to 1 if you have F_NOTIFY fcntl */ +#undef USE_DNOTIFY --- fam-2.7.0/configure.ac 2003-11-26 20:47:59.000000000 +0100 +++ fam-2.7.0.dnotify/configure.ac 2004-01-30 13:50:33.000000000 +0100 @@ -34,7 +34,26 @@ AC_HEADER_DIRENT AC_CHECK_HEADERS([fcntl.h limits.h linux/imon.h netinet/in.h rpc/rpc.h rpc= svc/mount.h stddef.h stdlib.h string.h syslog.h sys/imon.h sys/param.h sys/= select.h sys/statvfs.h sys/syssgi.h sys/time.h sys/types.h sys/un.h unistd.= h]) =20 -if test "$have_sys_imon_h"; then +# Test for the linux dnotify fcntl +AC_MSG_CHECKING([for dnotify fcntl support]) +AC_TRY_COMPILE([ +#define _GNU_SOURCE =20 +#include +#include +], +[ int fd =3D 1; + fcntl (fd, F_NOTIFY, (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB) + |DN_MULTISHOT); +], have_dnotify=3Dyes, have_dnotify=3Dno) + +use_dnotify=3Dfalse +AC_MSG_RESULT($have_dnotify) + +if test "$have_dnotify"; then + MONITOR_FUNCS=3DIMonNone + AC_DEFINE(USE_DNOTIFY) + use_dnotify=3Dtrue +elif test "$have_sys_imon_h"; then MONITOR_FUNCS=3DIMonIRIX elif test "$have_linux_imon_h"; then MONITOR_FUNCS=3DIMonLinux @@ -42,6 +62,7 @@ MONITOR_FUNCS=3DIMonNone fi AC_SUBST(MONITOR_FUNCS) +AM_CONDITIONAL(USE_DNOTIFY, $use_dnotify) =20 # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL --- fam-2.7.0/src/IMon.h 2004-01-30 00:00:00.000000000 +0200 +++ fam-2.7.0.dnotify/src/IMon.h 2004-01-30 00:00:00.000000000 +0200 @@ -24,10 +24,7 @@ #define IMon_included =20 #include "config.h" -#include -#include - -#include "Boolean.h" +#include "Monitor.h" =20 struct stat; =20 @@ -41,25 +38,18 @@ // // The user of the IMon object is the Interest class. =20 -class IMon { +class IMon : public Monitor { =20 public: - - enum Status { OK =3D 0, BAD =3D -1 }; - enum Event { EXEC, EXIT, CHANGE }; - - typedef void (*EventHandler)(dev_t, ino_t, int event); - IMon(EventHandler h); ~IMon(); =20 static bool is_active(); =20 - Status express(const char *name, struct stat *stat_return); - Status revoke(const char *name, dev_t dev, ino_t ino); + virtual Status express(const char *name, struct stat *stat_return); + virtual Status revoke(const char *name, dev_t dev, ino_t ino); =20 private: - // Class Variables =20 static int imonfd; --- fam-2.7.0/src/Interest.h 2004-01-30 00:00:00.000000000 +0200 +++ fam-2.7.0.dnotify/src/Interest.h 2004-01-30 00:00:00.000000000 +0200 @@ -32,7 +32,7 @@ =20 class Event; class FileSystem; -class IMon; +class Monitor; struct stat; =20 // Interest -- abstract base class for filesystem entities of interest. @@ -74,7 +74,7 @@ =20 // Public Class Method =20 - static void imon_handler(dev_t, ino_t, int event); + static void monitor_handler(dev_t, ino_t, int event); =20 static void enable_xtab_verification(bool enable); =20 @@ -121,7 +121,7 @@ =20 // Class Variables =20 - static IMon imon; + static Monitor *monitor; static Interest *hashtable[HASHSIZE]; static bool xtab_verification; =20 --- fam-2.7.0/src/Makefile.am 2003-01-19 13:00:17.000000000 +0100 +++ fam-2.7.0.dnotify/src/Makefile.am 2004-01-30 13:50:38.000000000 +0100 @@ -71,7 +71,11 @@ main.c++ \ timeval.c++ \ timeval.h \ - @MONITOR_FUNCS@.c++ + Monitor.h \ + DNotify.h \ + DNotify.c++ \ + @MONITOR_FUNCS@.c++=20 =20 -EXTRA_famd_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++ +EXTRA_famd_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++ DNotify.c++= \ + DNotify.h Monitor.h =20 --- fam-2.7.0/src/Monitor.h 2004-01-30 00:00:00.000000000 +0200 +++ fam-2.7.0.dnotify/src/Monitor.h 2004-01-30 00:00:00.000000000 +0200 @@ -0,0 +1,57 @@ +// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. +// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. +// =20 +// This program is free software; you can redistribute it and/or modify it +// under the terms of version 2 of the GNU General Public License as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it would be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any +// license provided herein, whether implied or otherwise, is limited to +// this program in accordance with the express provisions of the GNU +// General Public License. Patent licenses, if any, provided herein do n= ot +// apply to combinations of this program with other product or programs, = or +// any other product whatsoever. This program is distributed without any +// warranty that the program is delivered free of the rightful claim of a= ny +// third person by way of infringement or the like. See the GNU General +// Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write the Free Software Foundation, Inc., 59 +// Temple Place - Suite 330, Boston MA 02111-1307, USA. + +#ifndef Monitor_included +#define Monitor_included + +#include "config.h" +#include +#include + +struct stat; + +// Monitor is an abstract baseclass for differend file monitoring +// systems. The original system used was IMon, and the Montor API +// is heavily influenced by that. +// There can only be one instantiation of the Monitor object. +// +// The user of this object uses express() and revoke() to +// express/revoke interest in a file to imon. There is also +// a callback, the EventHandler. When an event comes in, +// the EventHandler is called. +// +// The main implementers of the Monitor class is IMon and DNotify + +class Monitor { +public: + + enum Status { OK =3D 0, BAD =3D -1 }; + enum Event { EXEC, EXIT, CHANGE }; + + typedef void (*EventHandler)(dev_t, ino_t, int event); + + virtual Status express(const char *name, struct stat *stat_return) =3D= 0; + virtual Status revoke(const char *name, dev_t dev, ino_t ino) =3D 0; +}; + +#endif /* !Monitor_included */ --4OpS+d6oOtUQaRm1-- --ABYnUdqoGSokwVM+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAGs7YV6N/vVHPhBcRAp+pAJ41fb81w10xHnR7AF3yfrL7aT7n3gCdHvr3 v0oxBksNKndjM0wBN4veiFw= =MAjf -----END PGP SIGNATURE----- --ABYnUdqoGSokwVM+--