mirror of
https://github.com/simh/simh.git
synced 2026-05-14 09:32:32 +00:00
CONSOLE: Reliably identify running under a debugger on *nix hosts
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user