Update docs; kill time-limiter when we queue.

This commit is contained in:
Dianne Skoll
2024-06-04 11:51:27 -04:00
parent d164d72c1c
commit 3e9eeea8dc
9 changed files with 102 additions and 16 deletions
+12 -2
View File
@@ -1014,8 +1014,17 @@ AddTrustedUser(char const *username)
NumTrustedUsers++;
}
static void
limit_execution_time(int t)
static pid_t LimiterPid = (pid_t) -1;
void unlimit_execution_time(void)
{
if (LimiterPid != (pid_t) -1) {
kill(LimiterPid, SIGTERM);
LimiterPid = (pid_t) -1;
}
}
static void limit_execution_time(int t)
{
pid_t parent = getpid();
@@ -1026,6 +1035,7 @@ limit_execution_time(int t)
}
if (pid > 0) {
LimiterPid = pid;
/* In the parent */
return;
}