aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--capture_opts.h1
-rw-r--r--capture_sync.c3
-rw-r--r--tshark.c2
4 files changed, 7 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index d86e31b9c1..5308b93176 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3275,6 +3275,7 @@ Robert Bullen <robert [AT] bitcricket.com>
Chuck Kristofek <chuck.kristofek [AT] ngc.com>
Markus Renz <Markus.Renz [AT] hirschmann.de>
Toshihiro Kataoka <kataoka.toshihiro [AT] gmail.com>
+Petr Lautrbach <plautrba [AT] redhat.com>
Dan Lasley <dlasley[AT]promus.com> gave permission for his
dumpit() hex-dump routine to be used.
diff --git a/capture_opts.h b/capture_opts.h
index 34709fce04..ed287df9a1 100644
--- a/capture_opts.h
+++ b/capture_opts.h
@@ -151,6 +151,7 @@ typedef struct capture_options_tag {
/* internally used (don't touch from outside) */
int fork_child; /**< If not -1, in parent, process ID of child */
+ int fork_child_status; /**< Child exit status */
#ifdef _WIN32
int signal_pipe_write_fd; /**< the pipe to signal the child */
#endif
diff --git a/capture_sync.c b/capture_sync.c
index 4f2c49d673..585deebd71 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -593,6 +593,8 @@ sync_pipe_start(capture_options *capture_opts) {
return FALSE;
}
+ capture_opts->fork_child_status = 0;
+
/* we might wait for a moment till child is ready, so update screen now */
main_window_update();
@@ -1511,6 +1513,7 @@ sync_pipe_input_cb(gint source, gpointer user_data)
/* No more child process. */
capture_opts->fork_child = -1;
+ capture_opts->fork_child_status = ret;
#ifdef _WIN32
ws_close(capture_opts->signal_pipe_write_fd);
diff --git a/tshark.c b/tshark.c
index a0c8f4f71e..b5105a44bb 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1748,8 +1748,10 @@ main(int argc, char *argv[])
*
* The capture code is a bit twisty, so it doesn't appear to
* be an easy fix. We just ignore the return value for now.
+ * Instead, pass on the exit status from the capture child.
*/
capture();
+ exit_status = global_capture_opts.fork_child_status;
if (print_packet_info) {
if (!write_finale()) {