Interrupted system call

Eero Tamminen oak at
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 *
> do
>    echo ./ $i
> done | xargs -P 4 .....
> Gives:
> 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 [1], instead of re-trying the write.

	- Eero

[1] "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 mailing list