bug-sh-utils
[Top][All Lists]
Advanced

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

Bug in yes


From: Roger Binns
Subject: Bug in yes
Date: Sat, 11 May 2002 20:22:04 -0700

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




reply via email to

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