From 18b29bd58d1daa1752e981488445e0fcb100f2a7 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 30 Dec 2025 11:28:36 -0500 Subject: Implement task timeout * Add argument: --task-timeout=1[s,m,h] * Timed out tasks are SIGKILL'd * If killing a task fails, the entire program ends --- src/cli/stasis/include/args.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cli/stasis/include') diff --git a/src/cli/stasis/include/args.h b/src/cli/stasis/include/args.h index 850be4a..d75fe29 100644 --- a/src/cli/stasis/include/args.h +++ b/src/cli/stasis/include/args.h @@ -18,8 +18,13 @@ #define OPT_NO_PARALLEL 1010 #define OPT_POOL_STATUS_INTERVAL 1011 #define OPT_NO_TASK_LOGGING 1012 +#define OPT_TASK_TIMEOUT 1013 extern struct option long_options[]; void usage(char *progname); +#define STR_TO_TIMEOUT_NEGATIVE (-1) +#define STR_TO_TIMEOUT_INVALID_TIME_SCALE (-2) +int str_to_timeout(char *s); + #endif //STASIS_ARGS_H -- cgit