From: Andreas Gruenbacher Subject: Re: [PATCH 2/4] fanotify: Add pids to events Date: Sat, 16 Jan 2010 23:53:45 +0100 Message-ID: <201001162353.45800.agruen@suse.de> References: <20091202141452.12819.93536.stgit@paris.rdu.redhat.com> <201001151612.10032.agruen@suse.de> <20100115212146.GA3714@count0.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Matthew Helsley , Eric Paris , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, hch@infradead.org, containers@lists.linux-foundation.org, Sukadev Bhattiprolu , Oleg Nesterov To: Matt Helsley Return-path: In-Reply-To: <20100115212146.GA3714@count0.beaverton.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Friday 15 January 2010 10:21:46 pm Matt Helsley wrote: > On Fri, Jan 15, 2010 at 04:12:09PM +0100, Andreas Gruenbacher wrote: > > > 2. If the event recipient does a clone and enters a new pidns the pid > > > number will be incorrect without any indication. > > > > No, if a process has a pid within the listener's namespace the listener > > will see this pid; otherwise, the resulting pid value is 0. > > So the pid reference is resolved at read(), correct? If so then that's > fine. (Otherwise I'd think the values could still become stale). Yes. Note that for non-blocking events, there is no guarantee that the triggering process still runs when the event is consumed though. Andreas