diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-12-30 11:28:36 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-12-30 11:28:36 -0500 |
| commit | 18b29bd58d1daa1752e981488445e0fcb100f2a7 (patch) | |
| tree | 0f4f2a5f62536ea80c7cd50801bc06d916e5c165 /src/cli/stasis/include | |
| parent | 67c290158cdb12b755c17b404f0eb63bc40eac73 (diff) | |
| download | stasis-18b29bd58d1daa1752e981488445e0fcb100f2a7.tar.gz | |
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
Diffstat (limited to 'src/cli/stasis/include')
| -rw-r--r-- | src/cli/stasis/include/args.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 |
