Interrupted system call
oak at helsinkinet.fi
Sun Mar 23 22:09:11 UTC 2014
On keskiviikko 05 maaliskuu 2014, Pál Gergő wrote:
> I think it's a bug, but not sure.
> Running the following script:
> for i in *
> echo ./do_stuff_with.sh $i
> done | xargs -P 4 .....
> bash: echo: write error: Interrupted system call
> ...when I'm resizing the window. Happens with both konsole and
> xfce4-terminal under xubuntu-session.
Resizing a terminal causes SIGWINCH signal to be sent
so that affected processes know that window size was
System calls can be interrupted by signals.
By default SIGWINCH signal is ignored, but Bash understandably
has a handler for it i.e. it's not ignored, and apparently
Bash's internal echo implementation bails out if write gets
interrupted , instead of re-trying the write.
 "man 2 write":
EINTR The call was interrupted by a signal before any data was
written; see signal(7).
More information about the xubuntu-devel