(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:
parent
02a9af06a0
commit
2ba645308e
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ play(int sock)
|
||||||
n = recv_input(input_fd, &inbuf);
|
n = recv_input(input_fd, &inbuf);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
perror("read stdin"); /* FIXME stdin misleading, could be execing */
|
perror("read stdin"); /* FIXME stdin misleading, could be execing */
|
||||||
return -1;
|
n = 0;
|
||||||
}
|
}
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
/* EOF on input */
|
/* EOF on input */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue