Misc. fixes

This commit is contained in:
Jack Halford 2017-09-03 23:32:38 +02:00
parent 7611f01305
commit 3b44f178fc

View file

@ -75,15 +75,14 @@ int main(int ac, char **av)
(void)ac;
if ((child = fork()) == 0) {
// child process
ptrace(PTRACE_TRACEME, child, 0, 0);
/* ptrace(PTRACE_TRACEME, child, 0, 0); */
raise(SIGSTOP);
execve(av[1], av + 1, environ);
}
/* ptrace(PTRACE_SEIZE, child, 0, 0); */
ptrace(PTRACE_SEIZE, child, 0, (void*)(PTRACE_O_TRACESYSGOOD));
ptrace(PTRACE_INTERRUPT, child, 0, 0);
wait(&status);
ptrace(PTRACE_SETOPTIONS, child, NULL, PTRACE_O_TRACEEXEC);
ptrace(PTRACE_SETOPTIONS, child, NULL, PTRACE_O_TRACESYSGOOD);
/* ptrace(PTRACE_SETOPTIONS, child, NULL, PTRACE_O_TRACEEXEC); */
while (1) {
ptrace(PTRACE_SYSCALL, child, NULL, NULL);
waitpid(child, &status, 0);