| Previous | Next |
| ERROR_NOTHING_TO_TERMINATE | ERROR_PROCESS_IN_JOB |
ERROR_PROCESS_NOT_IN_JOB
the specified process is not associated with the queried job object.
ERROR_PROCESS_NOT_IN_JOB identifies this condition: Job APIs return this result when an operation assumes membership that does not exist. The process may never have been assigned, may belong to a different job, or may have exited and been replaced before the check.
Where the result appears
- IsProcessInJob and job-membership validation.
- resource-control services.
- sandbox and worker-process supervision.
- cleanup code that removes or accounts for job members.
What to collect
- process ID and creation timestamp.
- job handle identity and access rights.
- membership query result immediately before the failing action.
- nested-job configuration and parent process.
Handling and recovery
Branch explicitly on nonmembership. Assign the process only when policy allows and while it is still eligible; otherwise continue with the non-job cleanup path. Do not repeatedly remove a process from a job because Windows job membership is not managed like a mutable list.
Common misinterpretation
A process can be in some job while not being in the specific job supplied by the caller. Record which job was tested instead of logging only the PID.
References
Looking for a different code? Search another status or error code.