Danek Duvall wrote: > Roland Mainz wrote: > > Roland Mainz wrote: > > > Does anyone know in which conditions "cat" may return an exit code of > > > "141" when writing to a FIFO ? > > > > The question wasn't 100% correct. It should be: In which conditions can > > the statement "cat foo.txt >myfifo" return an exit code of "141" (e.g. > > either "cat" or the redirection seems to fail but I am not sure (since I > > am doing remote debugging via email... ;-( )) ? > > The exit code indicates that the process caught SIGPIPE. And write(2) says > that SIGPIPE will be sent to a process that tries to write to a pipe or > fifo that isn't open for reading by any process. But I presume you knew > that.
Right... I hoped that someone knows a more obsure condition which may trigger this exit code... > I don't know offhand how to reproduce that, though, since your command will > block on the open() if nothing's listening on the other end, and should > they have modified their shell to open with O_NONBLOCK, the open will > simply fail. Perhaps between the open() and the write(), the reader died? I don't know... half of the issue is that I am doing remote debugging via email and can't replicate the condition on my machine... ;-( ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)
