Add a check to see if the primary process is running and exit gracefully if it
is not.

Suggested-by: Patrick Kutch <patrick.g.kutch at intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan at intel.com>
---
 app/proc_info/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 6dc0bbb..ddc8cf8 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -329,6 +329,11 @@ 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.4.11

Reply via email to