From af2c6fffe6bdea4dd55c5faf731fbaec27275d0b Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Wed, 7 Sep 2016 11:37:50 +0100 Subject: [PATCH] app/proc_info: check for primary process Add a check to see if the primary process is running and exit gracefully if it is not. Suggested-by: Patrick Kutch Signed-off-by: Maryam Tahhan Acked-by: Harry van Haaren --- app/proc_info/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/proc_info/main.c b/app/proc_info/main.c index 6dc0bbb8bd..8246fb2aec 100644 --- a/app/proc_info/main.c +++ b/app/proc_info/main.c @@ -329,6 +329,9 @@ main(int argc, char **argv) argc -= ret; argv += (ret - 3); + if (!rte_eal_primary_proc_alive(NULL)) + rte_exit(EXIT_FAILURE, "No primary DPDK process is running.\n"); + /* parse app arguments */ ret = proc_info_parse_args(argc, argv); if (ret < 0) -- 2.20.1