Re: git: kernel: Don't disturb about-to-be reaped zombies.

看板DFBSD_commit作者時間14年前 (2011/05/29 02:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
:commit 9458c398c0b97d30032a6541f8ab452cd93f5a86 :Author: YONETANI Tomokazu <y0netan1@dragonflybsd.org> :Date: Fri May 27 22:27:39 2011 +0900 : : kernel: Don't disturb about-to-be reaped zombies. : : Processes in zombproc with p_nthreads == 0 are about to be reaped, : so just leave them in peace. : : Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1996> : :Summary of changes: : sys/kern/kern_proc.c | 5 +++++ : 1 files changed, 5 insertions(+), 0 deletions(-) : :http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9458c398c0b97d30032a6541f8ab452cd93f5a86 : :-- :DragonFly BSD source repository I'm not sure about that. nthreads == 0 should just mean that the process's threads have all exited, not that the zombie process is about to be reaped by a wait*() call. It will probably be reaped soon, but not necessarily... it depends on when the user process actually calls wait*(). What we might have to do instead is add another process flag, say PREAPING, which would be set in kern_wait() somewhere around line 838 (just after it gets p->p_token). Even then we might want it to show up in the ps in case it gets stuck during the exit, so it isn't an invisible stuck process. ` -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #1DuJ-d4G (DFBSD_commit)
文章代碼(AID): #1DuJ-d4G (DFBSD_commit)