Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

SIGPIPE echoing to fifo exits zsh



Hi,

I noticed this thing:

shell1% mkfifo /tmp/fifo
shell1% while :; do head -1 /tmp/fifo; done

shell2% gdb zsh
(gdb) r -f
juno% repeat 1000 echo a >/tmp/fifo

Program received signal SIGPIPE, Broken pipe.
0x00007ffff71a7100 in __write_nocancel () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff71a7100 in __write_nocancel () from /usr/lib/libc.so.6
#1  0x00007ffff71410d3 in _IO_new_file_write () from /usr/lib/libc.so.6
#2  0x00007ffff7140fb2 in new_do_write () from /usr/lib/libc.so.6
#3  0x00007ffff71422c5 in __GI__IO_do_write () from /usr/lib/libc.so.6
#4  0x00007ffff7141680 in __GI__IO_file_sync () from /usr/lib/libc.so.6
#5  0x00007ffff713654b in fflush () from /usr/lib/libc.so.6
#6  0x000000000041a2dd in bin_print ()
#7  0x000000000041d117 in execbuiltin ()
#8  0x000000000042b2d1 in ?? ()
#9  0x000000000042b866 in ?? ()
#10 0x000000000042bdaf in ?? ()
#11 0x000000000042cf5f in execlist ()
#12 0x000000000044c354 in execfor ()
#13 0x000000000042a73b in ?? ()
#14 0x000000000042b866 in ?? ()
#15 0x000000000042bdaf in ?? ()
#16 0x000000000042cf5f in execlist ()
#17 0x000000000042d47d in execode ()
#18 0x000000000043d972 in loop ()
#19 0x0000000000440b1e in zsh_main ()
#20 0x00007ffff70eca15 in __libc_start_main () from /usr/lib/libc.so.6
#21 0x000000000040f3d1 in _start ()

Using /bin/echo (coreutils 8.20), the code works flawlessy (all lines
get through the FIFO).

Thanks,
-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



Messages sorted by: Reverse Date, Date, Thread, Author