nix icon indicating copy to clipboard operation
nix copied to clipboard

`PTRACE_KILL` is depreciated

Open cscherrNT opened this issue 7 months ago • 0 comments
trafficstars

According to the ptrace(2) System Calls Manual (man ptrace), the PTRACE_KILL request is depreciated. It might be a good idea to mark ptrace::kill as depreciated too. The manual recommends to instead use the normal kill.

       PTRACE_KILL
              Send the tracee a SIGKILL to terminate it.  (addr and data are ignored.)

              This operation is deprecated; do not use it!  Instead, send a SIGKILL directly using
              kill(2) or tgkill(2).  The problem with PTRACE_KILL is that it requires  the  tracee
              to  be  in  signal-delivery-stop, otherwise it may not work (i.e., may complete suc‐
              cessfully but won't kill the tracee).  By contrast, sending a SIGKILL  directly  has
              no such limitation.

cscherrNT avatar Apr 10 '25 14:04 cscherrNT