(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.
This commit is contained in:
Markus Armbruster 2007-11-18 09:51:16 +00:00
parent 02a9af06a0
commit 2ba645308e

View file

@ -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 */