Re: [ptrace] please review follow fork/exec changes

看板FB_current作者時間14年前 (2012/02/14 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串24/33 (看更多)
--NvQORXwiARETsYmR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I looked at the orphan.patch. Am I right that the orphans are the real childs of the process which are temporarily reparented to the debugger ? Whatever they are, a comment should be added to proc.h describing what does it mean. Please provide me with a test case that demonstrates the issue solved by the change. The new LIST_FOREACH(&q->p_orphans) body is copy/pasted, together with the comments, from the LIST_FOREACH(&q->p_children). Can the common code be moved into some function ? Shouldn't there be some assertion in proc_reparent() for the case when we remove child from the orphans list, that the child is no longer debugged ? Why in proc_reparent(), in the case of P_TRACED child, you do PROC_UNLOC/PROC_LOCK ? It seems that now wait4(2) can be called from the real (non-debugger) parent first and result in the call to proc_reap(), isn't it ? We would then just reparent the child back to the caller, still leaving the zombie and confusing debugger. --NvQORXwiARETsYmR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk85LBgACgkQC3+MBN1Mb4gRQACg648AR9jq9d3YDE2AGiRvtgce SF0An2GfDxACAG/UiFTa1XJKC8a/nzxj =49Nc -----END PGP SIGNATURE----- --NvQORXwiARETsYmR--
文章代碼(AID): #1FEK_Zol (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1FEK_Zol (FB_current)