If the signals that the yes process inherits have SIGPIPE set to SIG_IGN
then yes will never exit.  What happens is that the write() constantly gets
EPIPE, but ignores it.  The accompanying SIGPIPE is also ignored, and
yes sits there in an infinite loop.

Looking at the yes source, it shows that yes calls ferror() every 1000
iterations.  It would appear that glibc doesn't consider EPIPE on
a stdio stream to be an error.

sh-utils version is 2.0.11 as shipped on Mandrake.  It also happens with
whatever versions are shipped on Redhat 7.1 and 7.2.

A simple fix is to explicitly set SIGPIPE to SIG_DFL in yes.c.

Roger


_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to