1
0
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:
Mark Pizzolato
2026-03-05 12:04:36 -10:00
parent e177a89210
commit ae805f7818

View File

@@ -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))