NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53800 (ptrace crashes)

Synopsis: ptrace crashes

State-Changed-From-To: open->closed
State-Changed-When: Wed, 19 Dec 2018 08:03:01 +0100
Not a bug, works as intended.

PT_DETACH specifies in the 3rd argument 0x0 and this indicates to resume since position 0x0.
In order to resume program without changing instruction pointer, there is need to specify (void *)1,
e.g. ptrace(PT_DETACH, ppid, (void *)1, 0);.

The child should also use _exit(0) at the end of its execution block.

Home | Main Index | Thread Index | Old Index