The main capture loop of tcpdump ends when SIGINT/SIGTERM sets
is_aborted. In this case, the return value should reflect this clean
shutdown.

Signed-off-by: Sven Eckelmann <[email protected]>
---
 tcpdump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tcpdump.c b/tcpdump.c
index a48f8ad..33b7226 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1618,6 +1618,8 @@ static int tcpdump(struct state *state __maybe_unused, 
int argc, char **argv)
                }
        }
 
+       ret = EXIT_SUCCESS;
+
 out:
        list_for_each_entry_safe(dump_if, dump_if_tmp, &dump_if_list, list) {
                if (dump_if->raw_sock >= 0)

-- 
2.47.3

Reply via email to