Fix linux_getppid() to debug the actual parent, even it was reparented

by debugger.

Reviewed by:	dchagin@
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D9361
This commit is contained in:
trasz 2017-01-31 15:22:51 +00:00
parent c8e06fdde3
commit fa5ec8e08d

View File

@ -1733,9 +1733,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args)
printf(ARGS(getppid, ""));
#endif
PROC_LOCK(td->td_proc);
td->td_retval[0] = td->td_proc->p_pptr->p_pid;
PROC_UNLOCK(td->td_proc);
td->td_retval[0] = kern_getppid(td);
return (0);
}