From: Alan T. DeKok Date: Thu, 24 Apr 2025 15:09:18 +0000 (-0400) Subject: don't set timeout if we have a TTY and lldb / gdb X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55088bf33e253a35137745320ad08385d90e31de;p=thirdparty%2Ffreeradius-server.git don't set timeout if we have a TTY and lldb / gdb so that the poor user doing "cut and paste" of test commands doesn't have their debugger session suddenly disappear --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 5ec60ad5fa..3ea226df7f 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -2776,6 +2776,7 @@ static int run_mode(command_t *cmd) if ((strcmp(q, "gdb") == 0) || (strcmp(q, "lldb") == 0)) { setenv("DEBUGGER_ATTACHED", "yes", 1); + if (isatty(STDIN_FILENO)) cmd->timeout = 0; } rv = run_command(cmd, cmd->arglist);