RTFM... (really: sed -n 100,115p)

Rahul Dhesi dhesi at bsu-cs.bsu.edu
Sat May 20 08:58:54 AEST 1989


In article <7320 at bsu-cs.bsu.edu> I wrote:
>>Are you
>>implying that each filter should read all its input ??
>
>Yes, unless it knows that a process providing that input is prepared to
>gracefully handle the situation when writing to stdout causes an
>error.

Reconsidering this, I realize that the SIGPIPE that occurs when the
process writes to a broken pipe ought to abort it silently.  The user
will not see the "broken pipe" message unless the process catches
SIGPIPE and prints the message.

Unfortunately, I have come across programs that do catch SIGPIPE and
print an error message.

Further, it's quite conceivable that a process that is writing to its
standard output will (a) finish writing and then (b) do some cleanup.
Unless such a process catches SIGPIPE, it will simply abort without
cleaning up.

So I still think that filters should read all their input.
-- 
Rahul Dhesi <dhesi at bsu-cs.bsu.edu>
UUCP:    ...!{iuvax,pur-ee}!bsu-cs!dhesi



More information about the Comp.unix.questions mailing list