aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-10-02 14:57:48 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-10-02 14:57:48 -0400
commit04cf9ee4f65c1d0b2b60b9ac87cd91c0a333889e (patch)
tree8e481eb643337432bcb485b65c3b49a7b7db3561
parentf6c504630ecfa38c1516123019bdf67b921f1107 (diff)
downloadstasis-04cf9ee4f65c1d0b2b60b9ac87cd91c0a333889e.tar.gz
Allow user to define the time interval for "task is running" message
-rw-r--r--include/multiprocessing.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/multiprocessing.h b/include/multiprocessing.h
index c126999..5919462 100644
--- a/include/multiprocessing.h
+++ b/include/multiprocessing.h
@@ -15,6 +15,8 @@ struct MultiProcessingTask {
pid_t parent_pid; ///< Program PID (parent process)
int status; ///< Child process exit status
int signaled_by; ///< Last signal received, if any
+ time_t _now; ///< Current time
+ time_t _seconds; ///< Time elapsed (used by MultiprocessingPool.status_interval)
char ident[255]; ///< Identity of the pool task
char *cmd; ///< Shell command(s) to be executed
size_t cmd_len; ///< Length of command string (for mmap/munmap)
@@ -33,6 +35,7 @@ struct MultiProcessingPool {
size_t num_alloc; ///< Number of tasks allocated by the task array
char ident[255]; ///< Identity of task pool
char log_root[PATH_MAX]; ///< Base directory to store stderr/stdout log files
+ int status_interval; ///< Report a pooled task is "running" every n seconds
};
/// Maximum number of multiprocessing tasks STASIS can execute