Nothing prevents the signalled process from exiting, and then other process among eligible for signalling to reuse the exited process pid. In this case, presence of the pid in the 'pids' unr set prevents it from getting the deserved signal. Handle it by marking each process with the new flag P2_REAPKILLED when we are about to send the signal. If the process pid is present in the pids unr, but the struct proc is not marked with P2_REAPKILLED, we must send signal to the pid again. The use of the flag relies on the global sapblk preventing parallel reapkills. The pids unr must be used to clear the flags to all signalled processes.
unr(9): add iterator interface
unr(9) iterator: add naive test To use, compile userspace code e.g. into the subr_unit binary, then do $ while ./subr_unit -iv >|/tmp/subr_unit.log ; do :; done The loop should be left run for as long as possible.
Also minor commits fix style, move is_bitmap() around and use it in one more place.
Document clean_unrhdr().