remove unused includes and inline ptrace options define

This commit is contained in:
Nikita Smith
2025-11-07 14:39:46 -08:00
committed by Ryan Fleury
parent 880b8135cc
commit 857860fb27
2 changed files with 3 additions and 12 deletions
+2 -1
View File
@@ -1636,7 +1636,8 @@ dmn_ctrl_launch(DMN_CtrlCtx *ctx, OS_ProcessLaunchParams *params)
//- rjf: successful launch
case LaunchStatus_Success:
{
setoptions_result = ptrace(PTRACE_SETOPTIONS, pid, 0, PtrFromInt(DMN_LNX_PTRACE_OPTIONS));
uintptr_t trace_options = PTRACE_O_TRACEEXIT|PTRACE_O_EXITKILL|PTRACE_O_TRACEFORK|PTRACE_O_TRACEVFORK|PTRACE_O_TRACECLONE;
setoptions_result = ptrace(PTRACE_SETOPTIONS, pid, 0, PtrFromInt(trace_options));
if(setoptions_result == -1) { error__need_child_kill = 1; goto error; }
ELF_Hdr64 exe_ehdr = dmn_lnx_ehdr_from_pid(pid);
+1 -11
View File
@@ -8,22 +8,12 @@
//~ rjf: Includes
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/uio.h>
#include <unistd.h>
#include <elf.h>
#include <dirent.h>
#include <errno.h>
////////////////////////////////
//~ rjf: ptrace options
#define DMN_LNX_PTRACE_OPTIONS (PTRACE_O_TRACEEXIT|\
PTRACE_O_EXITKILL|\
PTRACE_O_TRACEFORK|\
PTRACE_O_TRACEVFORK|\
PTRACE_O_TRACECLONE)
//~ SIGTRAP codes
enum
{