If primary process exits, then it is not possible (or needed)
to cleanup resources. Instead just exit after closing the
capture file.
Bugzilla ID: 1760
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Khadem Ullah <[email protected]>
---
app/dumpcap/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index e5ba36350b..3621c0ebe3 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -1059,6 +1059,10 @@ int main(int argc, char **argv)
else
pcap_dump_close(out.dumper);
+ /* If primary has exited, do not try and communicate with it */
+ if (!rte_eal_primary_proc_alive(NULL))
+ return 0;
+
cleanup_pdump_resources();
rte_ring_free(r);
--
2.51.0