add dlclose

This commit is contained in:
LiYang 2016-08-27 21:25:49 +08:00
parent 4bf7c4765a
commit e9ee465516
3 changed files with 12 additions and 11 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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 {