Fix client to abort script execution on SIGINT

This commit is contained in:
Markus Armbruster 2009-04-11 22:52:52 +02:00
parent e3cee85f7c
commit 04a8ed4a20

View file

@ -489,8 +489,14 @@ play(int sock)
&& ring_putm(&inbuf, EOF_COOKIE, sizeof(EOF_COOKIE) - 1) >= 0) && ring_putm(&inbuf, EOF_COOKIE, sizeof(EOF_COOKIE) - 1) >= 0)
send_eof--; send_eof--;
if (send_intr if (send_intr
&& ring_putm(&inbuf, INTR_COOKIE, sizeof(INTR_COOKIE) - 1) >= 0) && ring_putm(&inbuf, INTR_COOKIE, sizeof(INTR_COOKIE) - 1) >= 0) {
send_intr = 0; send_intr = 0;
if (input_fd) {
/* execute aborted, switch back to fd 0 */
close(input_fd);
input_fd = eof_fd0 ? -1 : 0;
}
}
if (n < 0) if (n < 0)
continue; continue;