From 2ba645308e94f153b8f9c2a73c40d0b38e0fc822 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 18 Nov 2007 09:51:16 +0000 Subject: [PATCH] (play): Continue after input read error, treating it like EOF. This fixes error handling when a script can be opened but not read: it switches back to standard input. And it handles errors on standard input more gracefully: orderly shutdown, buffered output is still written out. --- src/client/play.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/play.c b/src/client/play.c index c3fe98e2..2cfacb12 100644 --- a/src/client/play.c +++ b/src/client/play.c @@ -271,7 +271,7 @@ play(int sock) n = recv_input(input_fd, &inbuf); if (n < 0) { perror("read stdin"); /* FIXME stdin misleading, could be execing */ - return -1; + n = 0; } if (n == 0) { /* EOF on input */