CVSROOT: /cvs Module name: src Changes by: kette...@cvs.openbsd.org 2012/04/12 08:40:41
Modified files: sys/kern : sys_process.c Log message: If the "main" thread exits it stays around but unlinks itself from the threads list. Calling TAILQ_NEXT on them is a bad idea and will panic the kernel. So check the P_WEXIT flag and pretend the thread doesn't exist if it is set. Also make PT_GET_THREAD_FIRST return the first thread on the threads list instead of the "main" thread, such that you can actually keep enumerating the threads in this case. ok guenther@, miod@