Mac OS X Leopard extends PT_DENY_ATTACH to prevent introspection into processes using dtrace. Adam Leventhal recently discovered that Leopard extends the ptrace() request type that prevents a debugger from attaching to the calling process. In 10.4, I was able to work-around this with the amusing temp_patch_ptrace() API. This API has disappeared in 10.5, and I hold that the correct fix is the removal of PT_deny_attach from Mac OSX.”]
Source: https://landonf.org/code/macosx/Leopard_PT_DENY_ATTACH.20080122.html

