Re: sed "Bug" report: GNU sed version 4.2.1

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
> Date: Tue, 29 May 2012 17:55:05 -0500
> From: Kevin Fegan <[email protected]>
> 
> I am using sed version 4.2.1 on Windows 7 Home Premium.
> (Output from sed --version is at the bottom of this message).
> 
> Problem occurs when piping output of sed command to input of another  
> sed command when second sed command uses the "q" command that results  
> in the command ending "early".
> 
> The problem is an "inconsistent" error message that is probably issued  
> by the first instance of the sed command.
> 
> The error message can be something like:
> 1) sed: couldn't flush stdout: Invalid argument
> 
> 2) sed: couldn't flush stdout: No such file or directory
> 
> 3) sed: couldn't write 275 items to stdout: No such file or directory
> The process tried to write to a nonexistent pipe.
> 
> and perhaps others.

These are the Windows equivalent of "Broken pipe" error message on
Posix systems.  The Sed command that uses "q" exits, and then the
pipe's receiving end is gone and the Windows shell closes the pipe.
Then the Sed command that writes to the pipe exits with the error
messages you describe.

This is expected behavior, so I'm unsure why you are saying it's a
bug.  What would you expect instead?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.