[job] implement ZX_JOB_TERMINATED signal
Implements ZX_JOB_TERMINATED, which is signaled when a job is killed, after all its children have finished cleaning up. This also changes job tracking behavior. Previously, if a job was killed it would stay in the job trees until the last handle was closed. With this patch, jobs now behave like threads or processes and remove themselves from the task trees as soon as they (and all children) have been killed. This provides a more consistent behavior among all tasks. As a nice side-effect, now if a job fails to create (e.g. if the parent is already dead) we never add it to the all-jobs tree; previously it would be briefly added and then removed. ZX-3919 Test: runtests Test: run-zircon-x64 -C -b -k -z core-tests-x64.zbi Change-Id: Ic367b7df9704e5012a1c73636d76784c527a4636
Showing
- zircon/kernel/object/include/object/job_dispatcher.h 19 additions, 0 deletionszircon/kernel/object/include/object/job_dispatcher.h
- zircon/kernel/object/job_dispatcher.cpp 94 additions, 72 deletionszircon/kernel/object/job_dispatcher.cpp
- zircon/kernel/object/process_dispatcher.cpp 0 additions, 3 deletionszircon/kernel/object/process_dispatcher.cpp
- zircon/system/public/zircon/types.h 1 addition, 3 deletionszircon/system/public/zircon/types.h
- zircon/system/utest/core/job/jobs.cpp 124 additions, 6 deletionszircon/system/utest/core/job/jobs.cpp
Loading
Please register or sign in to comment