From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23449 invoked from network); 1 Jun 2005 15:27:17 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Jun 2005 15:27:17 -0000 Received: (qmail 67758 invoked from network); 1 Jun 2005 15:27:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Jun 2005 15:27:10 -0000 Received: (qmail 2248 invoked by alias); 1 Jun 2005 15:27:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8930 Received: (qmail 2238 invoked from network); 1 Jun 2005 15:27:01 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Jun 2005 15:27:01 -0000 Received: (qmail 66624 invoked from network); 1 Jun 2005 15:27:01 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 1 Jun 2005 15:26:57 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DdV1j-00023f-FS for zsh-users@sunsite.dk; Wed, 01 Jun 2005 17:21:03 +0200 Received: from h34-aclarke.sv.meer.net ([205.217.153.34]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jun 2005 17:21:03 +0200 Received: from tk-gmane+at by h34-aclarke.sv.meer.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jun 2005 17:21:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: "Tim K. (Gmane)" Subject: Re: named pipes blocking zsh Date: Wed, 01 Jun 2005 08:20:00 -0700 Message-ID: References: <1050601144728.ZM11059@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: h34-aclarke.sv.meer.net User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <1050601144728.ZM11059@candle.brasslantern.com> Sender: news X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 What's interesting is that if I 'strace' the zsh process while it's stuck (after the pipe was deleted), it will terminate. I'm not sure what the explanation behind it is ... Thanks. Tim Bart Schaefer wrote: >On Jun 1, 7:18am, Tim K. (Gmane) wrote: >} >} I have a situtation with zsh: I use pine as my mail reader and it has a >} feature where it can create a named pipe (FIFO) and write to it when new >} mail arrives. >} >} This all seems to work, except when I quit pine, hence terminating the >} main "parent" script, the child "notify" script does not exit, it's >} stuck reading from the pipe (even though the pipe is deleted). > >I think this qualifies as a pine bug. Removing a named pipe will not >by itself send an EOF to any processes that are listening on it. The >right way for pine to shut down the connection would be to open the fifo, >remove the disk file, then send a final EOF by closing the descriptor. > >Anything else is a race condition with the listening process, which may >re-open the fifo for reading before pine has removed it. > > >