mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-22 20:36:06 +08:00
End onboard transport loop if the pipe closes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user