]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't set timeout if we have a TTY and lldb / gdb
authorAlan T. DeKok <aland@freeradius.org>
Thu, 24 Apr 2025 15:09:18 +0000 (11:09 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 24 Apr 2025 15:46:35 +0000 (11:46 -0400)
so that the poor user doing "cut and paste" of test commands
doesn't have their debugger session suddenly disappear

scripts/jlibtool.c

index 5ec60ad5fa8c73087e2fd7a0e11150bf069f58e4..3ea226df7fdc2d40364bb3e9c9431d914e22bb03 100644 (file)
@@ -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);