aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-02-12 20:41:28 +0000
committerGuy Harris <guy@alum.mit.edu>2006-02-12 20:41:28 +0000
commit3607862994ecf8e8552df6eb11e23b6d762a81fd (patch)
tree5d03ea8d6f1c76c743ac0aed0f8767a857383a3f /capture_sync.c
parent6009f7c549ab2f37367494487ffd41041d5edeb3 (diff)
Distinguish between pipe_read_block() returning 0 (EOF) or a negative
value (error reading). svn path=/trunk/; revision=17276
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 1e438c57be..0edc715f3c 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -611,11 +611,19 @@ sync_pipe_input_cb(gint source, gpointer user_data)
nread = pipe_read_block(source, &indicator, SP_MAX_MSG_LEN, buffer);
if(nread <= 0) {
- g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "sync_pipe_input_cb: child has closed sync_pipe");
+ if (nread == 0)
+ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG,
+ "sync_pipe_input_cb: child has closed sync_pipe");
+ else
+ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG,
+ "sync_pipe_input_cb: error reading from sync pipe");
/* The child has closed the sync pipe, meaning it's not going to be
capturing any more packets. Pick up its exit status, and
- complain if it did anything other than exit with status 0. */
+ complain if it did anything other than exit with status 0.
+
+ XXX - what if we got an error from the sync pipe? Do we have
+ to kill the child? */
sync_pipe_wait_for_child(capture_opts);
#ifdef _WIN32