Francis Montagnac wrote:
I think that the father of this bash script (lrm?) is setting the
action of SIGPIPE to SIG_IGN, and then "cat" itself notice that and
resets it to a function printing that on stderr.

Re-thinking to that: cat should *not* trap SIGPIPE, but only checking
the return code of every write (like it should).

It's not cat that's printing the error message.  It's the shell.

Cat died a death by signal SIGPIPE. It printed the message. It's _supposed_ to die by sigpipe. The shell is _supposed_ to print a notice when a command dies by a signal.

This is all normal.

Dropping the -q flag and adding a "| line" or "| head -1" will get the same effect very slightly slower, but without anything dying "death by SIGPIPE".


--
    Alan Robertson <[EMAIL PROTECTED]>

"Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to