bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib/gnulib-tool: line 1512: echo: write error: Broken pipe


From: Bruno Haible
Subject: Re: gnulib/gnulib-tool: line 1512: echo: write error: Broken pipe
Date: Mon, 30 Jun 2008 04:11:15 +0200
User-agent: KMail/1.5.4

Hi Jim, Eric, shell utilities experts,

Sam reports that this line of code

  inmodules=`echo "$handledmodules" | LC_ALL=C join -v 2 - 
"$tmp"/queued-modules`

can print "gnulib-tool: line 1512: echo: write error: Broken pipe" on stderr.

1) The 'join' command (or 'join --nocheck-order' in coreutils 6.11 or newer)
   apparently closes its standard input and exits when the contents of the
   second file (small enough or even empty) allows to determine the complete
   'join' output - without having read all of its standard input.

2) The kernel then transforms the pipe into a pipe with no readers.

3) The 'echo' command, when writing to a pipe with no readers, gets a SIGPIPE.

4) The 'echo' command or its parent shell prints an error message on stderr.

Are these 4 behaviours all correct (POSIX compliant and to be expected)?
If not, which one is incorrect/buggy?

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]