From owner-freebsd-stable@FreeBSD.ORG Wed Jun 3 12:25:36 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBF51106564A for ; Wed, 3 Jun 2009 12:25:36 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from mail-fx0-f163.google.com (mail-fx0-f163.google.com [209.85.220.163]) by mx1.freebsd.org (Postfix) with ESMTP id 5AECF8FC15 for ; Wed, 3 Jun 2009 12:25:35 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fxm7 with SMTP id 7so2621668fxm.43 for ; Wed, 03 Jun 2009 05:25:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.104.74 with SMTP id n10mr534121fao.5.1244031935175; Wed, 03 Jun 2009 05:25:35 -0700 (PDT) In-Reply-To: References: From: Vlad Galu Date: Wed, 3 Jun 2009 15:25:14 +0300 Message-ID: To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: poll()-ing a pipe descriptor, watching for POLLHUP X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 12:25:37 -0000 Hm, according to the code at http://www.greenend.org.uk/rjk/2001/06/poll.html, it seems to work as expected (returning both POLLIN and POLLHUP), when closing the write end of the pipe from within the same process. On Wed, Jun 3, 2009 at 3:15 PM, Vlad Galu wrote: > Hello, > > Please take a look at the attached code. Shouldn't poll() get a > POLLHUP event when the child process exits, closing the write end of > the pipe? > > Thanks, > Vlad >