bug-coreutils
[Top][All Lists]
Advanced

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

Re: ls: write error: Broken pipe


From: Jim Meyering
Subject: Re: ls: write error: Broken pipe
Date: Thu, 01 Nov 2007 17:32:19 +0100

Dan Nicolaescu <address@hidden> wrote:
> I have been using this alias: lt = 'ls -lt | head'
...
> ls: write error: Broken pipe
>
> Is there any reason for this error to be printed?

Hi Dan,

You should see it only if you have changed the default signal
handling to ignore SIGPIPE, and then only some of the time.
When it's possible to see it, kernel buffering and the size of your
environment also determine how much can be written before the
signal is sent.

Some programs (like git) prefer not to diagnose this type of
write failure, but coreutils makes a point of never suppressing
such diagnostics, because sometimes they're legitimate.

This topic was beaten to death as a side effect of my patch to
make git detect a bunch of previously-ignored write errors:

  http://thread.gmane.org/gmane.comp.version-control.git/48469/focus=48617

If you're bored, read on in that thread... it gets even more animated.




reply via email to

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