From 860896b6285767903f0b40785da788757d6e1a79 Mon Sep 17 00:00:00 2001 From: rajeev-gupta-bashrc Date: Fri, 1 Nov 2024 22:28:55 +0530 Subject: [PATCH] added a kill command in pxh console to kill the whole process including gz server --- platforms/posix/src/px4/common/px4_daemon/pxh.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platforms/posix/src/px4/common/px4_daemon/pxh.cpp b/platforms/posix/src/px4/common/px4_daemon/pxh.cpp index 03e6db2501df..a5c1fe0e17e0 100644 --- a/platforms/posix/src/px4/common/px4_daemon/pxh.cpp +++ b/platforms/posix/src/px4/common/px4_daemon/pxh.cpp @@ -132,11 +132,13 @@ int Pxh::process_line(const std::string &line, bool silently_fail) // Do nothing return 0; - } else { + } else if (!silently_fail) { //std::cout << "Invalid command: " << command << "\ntype 'help' for a list of commands" << endl; printf("Invalid command: %s\ntype 'help' for a list of commands\n", command.c_str()); return -1; + } else { + return -1; } }