Update src/lcpex/liblcpex.cpp
parent
130d539f81
commit
e9556c6075
|
@ -281,9 +281,12 @@ int execute(
|
||||||
byte_count = read(watched_fds[this_fd].fd, buf, BUFFER_SIZE);
|
byte_count = read(watched_fds[this_fd].fd, buf, BUFFER_SIZE);
|
||||||
|
|
||||||
if (byte_count == -1) {
|
if (byte_count == -1) {
|
||||||
// error reading from pipe
|
if (errno == EAGAIN) { continue; } else {
|
||||||
perror("read");
|
// error reading from pipe
|
||||||
exit(EXIT_FAILURE);
|
perror("read");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (byte_count == 0) {
|
} else if (byte_count == 0) {
|
||||||
// reached EOF on one of the streams but not a HUP
|
// reached EOF on one of the streams but not a HUP
|
||||||
// we've read all we can this cycle, so go to the next fd in the for loop
|
// we've read all we can this cycle, so go to the next fd in the for loop
|
||||||
|
|
Loading…
Reference in New Issue