From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GFTIn-0004Gh-UR for garchives@archives.gentoo.org; Tue, 22 Aug 2006 10:16:10 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k7MADwkg007385; Tue, 22 Aug 2006 10:13:58 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k7MABjnB015313 for ; Tue, 22 Aug 2006 10:11:46 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 4EF226473D for ; Tue, 22 Aug 2006 10:11:45 +0000 (UTC) Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28775-04 for ; Tue, 22 Aug 2006 10:11:43 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 3344B6477C for ; Tue, 22 Aug 2006 10:11:41 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GFTCc-00051C-Lb for gentoo-user@gentoo.org; Tue, 22 Aug 2006 12:09:46 +0200 Received: from p508957ed.dip.t-dialin.net ([80.137.87.237]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Aug 2006 12:09:46 +0200 Received: from costa by p508957ed.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Aug 2006 12:09:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Marco Costa Subject: [gentoo-user] Re: inotify problem - SOLVED Date: Tue, 22 Aug 2006 11:51:23 +0200 Message-ID: <5m0rr3-6h5.ln1@legba.gamic.com> References: <9srgr3-n5s.ln1@legba.gamic.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig30BD7F53E0C7B6BDFC84D2D9" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p508957ed.dip.t-dialin.net User-Agent: Thunderbird 1.5.0.5 (X11/20060719) In-Reply-To: <9srgr3-n5s.ln1@legba.gamic.com> X-Enigmail-Version: 0.94.1.1 Sender: news X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Status: No, score=-1.862 required=5.5 tests=[AWL=-0.719, BAYES_00=-2.599, RCVD_IN_SORBS_WEB=1.456] X-Spam-Score: -1.862 X-Spam-Level: X-Archives-Salt: c5940e5c-3620-447c-98b4-419d6819185a X-Archives-Hash: 64a0754aa04d11c3f1f3cad158a39a92 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig30BD7F53E0C7B6BDFC84D2D9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Marco Costa wrote: > Hi. >=20 > I am trying to use inotify but something is not correct. > I am using gentoo 2006.0. > kernel: 2.6.17-gentoo-r4 > inotify is compiled in. > glibc 2.3.6-r4 >=20 > What happens: > I initialize inotify, it returns the file descriptor (fd). OK > I add a directory to watch with all flags. It returns the watch > descriptor (wd). OK > I read (blocking) the fd. It blocks. OK > -> I touch a file inside the directory I am watching > the read unblocks, but it really returns 0 bytes read and do not block > anymore. >=20 Problem solved. One must read all the available data at once. Reading just chunks will no= t work. The use of the ioctl FIONREAD is recommended. Regards, Marco Costa --------------enig30BD7F53E0C7B6BDFC84D2D9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) iD8DBQFE6tOlqTcS2XboXfwRCjTDAJ9Nm+V7lAnZK8NQwh9otwQHKyRFpACfd6G0 2ejzb5y2mnZIO/eZfV9uEtw= =4ng3 -----END PGP SIGNATURE----- --------------enig30BD7F53E0C7B6BDFC84D2D9-- -- gentoo-user@gentoo.org mailing list