[CentOS] Commands failing silently?

Filipe Brandenburger filbranden at gmail.com
Wed Mar 26 02:47:41 UTC 2008


Hi,

On Tue, Mar 25, 2008 at 2:21 PM, Dan Bongert <dbongert at wisc.edu> wrote:
>  thoth(3) /tmp> ls
>
>  thoth(4) /tmp> echo $?
>  141

141 is SIGPIPE. If the process is killed by a signal, the return code
will be 128+signal number. 141-128=13, and kill -l says: 13) SIGPIPE.

SIGPIPE means that something that ls is writing to is being closed.
That's really strange, and I couldn't find why.

I still think strace would be the best way to trace it. Please try:

# rm -f /tmp/ls-strace.txt; strace -o /tmp/ls-strace.txt -tt -s 1024
-f ls --color=tty

Repeat it until ls doesn't print anything. Then less your
/tmp/ls-strace.txt file, you'll probably have something like +++
killed by SIGPIPE +++ as the last line of it. Then try to figure out
what happened before it got the SIGPIPE. Probably a "write" to
something, try to figure out to which file descriptor. If you can't do
it, try to post the last few lines of the file here.

Also, can you post the output of this command?
# ls -la /proc/$$/fd/

Filipe



More information about the CentOS mailing list