[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5825] End onboard transport loop if the pipe closes
From: |
Allen Ibara |
Subject: |
[paparazzi-commits] [5825] End onboard transport loop if the pipe closes |
Date: |
Tue, 07 Sep 2010 17:43:20 +0000 |
Revision: 5825
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5825
Author: aibara
Date: 2010-09-07 17:43:20 +0000 (Tue, 07 Sep 2010)
Log Message:
-----------
End onboard transport loop if the pipe closes
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/fms/onboard_transport.c
Modified: paparazzi3/trunk/sw/airborne/fms/onboard_transport.c
===================================================================
--- paparazzi3/trunk/sw/airborne/fms/onboard_transport.c 2010-09-07
17:42:01 UTC (rev 5824)
+++ paparazzi3/trunk/sw/airborne/fms/onboard_transport.c 2010-09-07
17:43:20 UTC (rev 5825)
@@ -148,6 +148,10 @@
// 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 {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5825] End onboard transport loop if the pipe closes,
Allen Ibara <=