End onboard transport loop if the pipe closes

This commit is contained in:
Allen Ibara
2010-09-07 17:43:20 +00:00
parent 4fea6b2a29
commit b5f9b228d8
+4
View File
@@ -148,6 +148,10 @@ static int open_piped(char *filepath)
// copy from the read side of the pipe to the log
while (1) {
count = read(pipe_fd[0], buffer, LOG_BUFLEN);
if (count < 0) {
// error, presumably the pipe is closed
break;
}
retval = write(fd, buffer, count);
}
} else {