diff --git a/sim_console.c b/sim_console.c index 72097259..28a4f080 100644 --- a/sim_console.c +++ b/sim_console.c @@ -4346,7 +4346,7 @@ char command[128]; char response[256] = ""; FILE *f; -snprintf (command, sizeof (command), "ps -p %d | grep -E 'gdb|lldb|LLDB'", (int)getppid()); +snprintf (command, sizeof (command), "ps | grep %d | grep -E 'gdb|lldb|LLDB'", (int)getppid()); f = popen (command, "r"); if (f != NULL) { if (fgets(response, sizeof(response), f))