Skip to content

Commit

Permalink
runtime: avoid deprecated PTRACE_KILL
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-immunant committed Jan 9, 2024
1 parent 6f1e229 commit eb134ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion runtime/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ int main(int argc, char **argv) {

int exit_status = 0;
bool success = track_memory_map(pid, &exit_status, TRACE_MODE_SECCOMP);
ptrace(PTRACE_KILL, pid, 0, 0);
/* ensure the child is dead */
kill(pid, SIGKILL);

if (success)
exit(exit_status);
Expand Down
3 changes: 2 additions & 1 deletion runtime/track_memory_map_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ int main(int argc, char **argv) {

int exit_status = 0;
bool success = track_memory_map(pid, &exit_status, TRACE_MODE_PTRACE_SYSCALL);
ptrace(PTRACE_KILL, pid, 0, 0);
/* ensure the child is dead */
kill(pid, SIGKILL);

if (success) {
fprintf(stderr, "inferior exited with code %d\n", exit_status);
Expand Down

0 comments on commit eb134ed

Please sign in to comment.