diff options
| -rw-r--r-- | include/multiprocessing.h | 1 | ||||
| -rw-r--r-- | src/multiprocessing.c | 3 | 
2 files changed, 3 insertions, 1 deletions
| diff --git a/include/multiprocessing.h b/include/multiprocessing.h index d4213d2..af8b90a 100644 --- a/include/multiprocessing.h +++ b/include/multiprocessing.h @@ -17,6 +17,7 @@ struct MultiProcessingTask {      int signaled_by; ///< Last signal received, if any      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)      char working_dir[PATH_MAX]; ///< Path to directory `cmd` should be executed in      char log_file[PATH_MAX]; ///< Full path to stdout/stderr log file      char parent_script[PATH_MAX]; ///< Path to temporary script executing the task diff --git a/src/multiprocessing.c b/src/multiprocessing.c index 6a97b3b..5d22901 100644 --- a/src/multiprocessing.c +++ b/src/multiprocessing.c @@ -375,7 +375,8 @@ int mp_pool_join(struct MultiProcessingPool *pool, size_t jobs, size_t flags) {  struct MultiProcessingPool *mp_pool_init(const char *ident, const char *log_root) {      struct MultiProcessingPool *pool; -    if (!log_root) { +    if (!ident || !log_root) { +        // Pool must have an ident string          // log_root must be set          return NULL;      } | 
