delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/10/04/09:53:39

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4E8B0FC6.9050600@lysator.liu.se>
Date: Tue, 04 Oct 2011 15:53:10 +0200
From: Peter Rosin <peda AT lysator DOT liu DOT se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.9 Missing SIGPIPE?
References: <4E833CB4 DOT 3060004 AT lysator DOT liu DOT se>
In-Reply-To: <4E833CB4.3060004@lysator.liu.se>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

Peter Rosin skrev 2011-09-28 17:26:
> Hi!
> 
> When I use bash to build pipelines, they sometimes don't finish but
> instead some process remains running. Example:
> 
> $ tail -f -n 10000 log.txt | grep . | head -n 2
> 
> Almost instantly I get the expected two lines of output, but no prompt
> back. I have to use ctrl-c. If I don't ctrl-c I can run pstree in
> another terminal and see this:
> 
> $ pstree
> ?─┬─mintty───bash───tail
>   └─mintty───bash───pstree

This example is a poor one, as tail simply waits for a new line, when it
gets a new line it forwards it to the pipe and promptly receives a
SIGPIPE as grep is not there anymore.

I'll get back when I have distilled a better STC. If I can...

Cheers,
Peter

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019