arch.c (honggfuzz-2.4) | : | arch.c (honggfuzz-2.5) | ||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
#include <dlfcn.h> | #include <dlfcn.h> | |||
#include <errno.h> | #include <errno.h> | |||
#include <fcntl.h> | #include <fcntl.h> | |||
#include <inttypes.h> | #include <inttypes.h> | |||
#include <locale.h> | #include <locale.h> | |||
#include <setjmp.h> | #include <setjmp.h> | |||
#include <signal.h> | #include <signal.h> | |||
#include <stdio.h> | #include <stdio.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <string.h> | #include <string.h> | |||
#if defined(__GLIBC__) | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | |||
#endif | ||||
#include <sys/personality.h> | #include <sys/personality.h> | |||
#include <sys/prctl.h> | #include <sys/prctl.h> | |||
#include <sys/syscall.h> | #include <sys/syscall.h> | |||
#include <sys/time.h> | #include <sys/time.h> | |||
#include <sys/types.h> | #include <sys/types.h> | |||
#include <sys/user.h> | #include <sys/user.h> | |||
#include <sys/utsname.h> | #include <sys/utsname.h> | |||
#include <sys/wait.h> | #include <sys/wait.h> | |||
#include <time.h> | #include <time.h> | |||
#include <unistd.h> | #include <unistd.h> | |||
skipping to change at line 97 | skipping to change at line 99 | |||
gid_t gid = getgid(); | gid_t gid = getgid(); | |||
pid_t pid = run->global->arch_linux.useClone | pid_t pid = run->global->arch_linux.useClone | |||
? arch_clone(run->global->arch_linux.cloneFlags | CLONE_UNTR ACED | SIGCHLD) | ? arch_clone(run->global->arch_linux.cloneFlags | CLONE_UNTR ACED | SIGCHLD) | |||
: fork(); | : fork(); | |||
if (pid == -1) { | if (pid == -1) { | |||
return pid; | return pid; | |||
} | } | |||
if (pid == 0) { | if (pid == 0) { | |||
logMutexReset(); | logMutexReset(); | |||
if (prctl(PR_SET_PDEATHSIG, (unsigned long)SIGKILL, 0UL, 0UL, 0UL) == -1 | ||||
) { | ||||
PLOG_W("prctl(PR_SET_PDEATHSIG, SIGKILL)"); | ||||
} | ||||
if (run->global->arch_linux.cloneFlags != 0 && !nsSetup(uid, gid)) { | if (run->global->arch_linux.cloneFlags != 0 && !nsSetup(uid, gid)) { | |||
PLOG_W("nsSetup(uid=%d, gid=%d)", (int)uid, (int)gid); | PLOG_W("nsSetup(uid=%d, gid=%d)", (int)uid, (int)gid); | |||
} | } | |||
return pid; | return pid; | |||
} | } | |||
return pid; | return pid; | |||
} | } | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 2 lines changed or added |