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

看板FB_current作者時間14年前 (2012/02/08 05:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串17/33 (看更多)
> So, do you in fact need to distinguish exec stops from syscall exit > against exec stops from PT_FOLLOW_EXEC, This is pretty much what I need. It's the same stop in syscall return right? I don't want to change when the stop happens, I want to have an lwpinfo flag that tells me when a stop occurred in a process under PT_FOLLOW_EXEC. > @@ -889,7 +890,9 @@ exec_fail_dealloc: > > if (error == 0) { > PROC_LOCK(p); > - td->td_dbgflags |= TDB_EXEC; > + if ((p->p_flag& P_TRACED) != 0&& > + ((P_FOLLOWEXEC) != 0 || (p->p_stops& S_PT_SCX) != 0)) > + td->td_dbgflags |= TDB_EXEC; > PROC_UNLOCK(p); > There's a small bug in the patch that makes it not work. The check for P_FOLLOWEXEC should be: + ((p->p_flag& P_FOLLOWEXEC) != 0 || (p->p_stops& S_PT_SCX) != 0)) Looks like the patch should work for me but I need to verify. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1FCP4Fx9 (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1FCP4Fx9 (FB_current)