mirror of
https://github.com/QingdaoU/Judger.git
synced 2024-12-29 08:21:41 +00:00
add dlclose
This commit is contained in:
parent
4bf7c4765a
commit
e9ee465516
@ -149,6 +149,7 @@ int child_process(void *args) {
|
||||
if (load_seccomp(handler, _config) != 0) {
|
||||
CHILD_ERROR_EXIT(LOAD_SECCOMP_FAILED);
|
||||
}
|
||||
dlclose(handler);
|
||||
}
|
||||
|
||||
execve(_config->exe_path, _config->args, _config->env);
|
||||
|
10
src/child.h
10
src/child.h
@ -4,11 +4,11 @@
|
||||
#include "runner.h"
|
||||
|
||||
#define CHILD_ERROR_EXIT(error_code)\
|
||||
{\
|
||||
LOG_ERROR(error_code); \
|
||||
raise(SIGUSR1); \
|
||||
return -1; \
|
||||
}
|
||||
{\
|
||||
LOG_ERROR(error_code); \
|
||||
raise(SIGUSR1); \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
|
||||
int child_process(void *config);
|
||||
|
12
src/runner.h
12
src/runner.h
@ -12,12 +12,12 @@
|
||||
#define LOG_ERROR(error_code) LOG_FATAL(log_fp, "Error: "#error_code);
|
||||
|
||||
#define ERROR_EXIT(error_code)\
|
||||
{\
|
||||
LOG_ERROR(error_code); \
|
||||
_result->error = error_code; \
|
||||
log_close(log_fp); \
|
||||
return; \
|
||||
}
|
||||
{\
|
||||
LOG_ERROR(error_code); \
|
||||
_result->error = error_code; \
|
||||
log_close(log_fp); \
|
||||
return; \
|
||||
}
|
||||
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user