diff --git a/src/child.c b/src/child.c index 64de70b..1451e42 100644 --- a/src/child.c +++ b/src/child.c @@ -36,7 +36,7 @@ void close_file(FILE *fp, ...) { } -int child_process(FILE *log_fp, struct config *_config) { +void child_process(FILE *log_fp, struct config *_config) { FILE *input_file = NULL, *output_file = NULL, *error_file = NULL; if (_config->max_stack != UNLIMITED) { @@ -159,5 +159,4 @@ int child_process(FILE *log_fp, struct config *_config) { execve(_config->exe_path, _config->args, _config->env); CHILD_ERROR_EXIT(EXECVE_FAILED); - return 0; } diff --git a/src/child.h b/src/child.h index e073078..c01e6e7 100644 --- a/src/child.h +++ b/src/child.h @@ -9,10 +9,10 @@ LOG_FATAL(log_fp, "Error: System errno: %s; Internal errno: "#error_code, strerror(errno)); \ close_file(input_file, output_file, error_file); \ raise(SIGUSR1); \ - return -1; \ + exit(EXIT_FAILURE); \ } -int child_process(FILE *log_fp, struct config *_config); +void child_process(FILE *log_fp, struct config *_config); #endif //JUDGER_CHILD_H