Under your stated valid-setup assumptions, I could not identify a public Microsoft API contract or authoritative clarification that explicitly guarantees the complete outcome when the caller terminates before CreateProcessW returns. That exact interrupted-call outcome is not explicitly specified in the references below. This is a boundary of what those sources establish, rather than evidence that an unprotected child can survive.
Regarding execution in point A, Raymond Chen’s article presents PROC_THREAD_ATTRIBUTE_JOB_LIST as the solution to the orphan window between separately creating a suspended process and assigning it to a job. It states that assignment occurs before the initial thread is allowed to run. Additionally, the process creation flags documentation states that CREATE_SUSPENDED prevents the primary thread from running until ResumeThread is called. These statements support the initial-thread ordering, but do not expressly settle every child-execution outcome when the caller terminates inside the API.
For the suspended-child and unwind questions in B and D, the CreateProcessW reference documents successful and failed returns, but does not specify rollback when the caller terminates before the function returns. I found no explicit statement requiring every partially created child to be either effectively covered by job termination or torn down without returning control to the caller. Suspension alone does not establish that cleanup guarantee.
Regarding point C, the process termination documentation states that the terminating process’s open handles are automatically closed. The job limit documentation specifies that JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE terminates all processes associated with the job when its last handle closes. A child associated with the job at that point is covered, including a suspended child, without requiring the caller to resume it or perform post-call cleanup. The unresolved part is how that closure is ordered against an assignment still pending inside CreateProcessW.
For internal references, Microsoft’s object lifetime documentation distinguishes open-handle counts from object-reference counts. A kernel pointer reference can keep an object allocated after its last handle closes; it does not constitute another open handle. This general lifetime rule does not specify which references CreateProcessW acquires, when they are released, or their effect on the assignment and termination ordering in your scenario.
The startup attribute documentation lists Windows 10 and Windows Server 2016 or later as the supported versions for PROC_THREAD_ATTRIBUTE_JOB_LIST. These are feature-availability requirements. With the handle ownership, extended-startup configuration, and applicable job-nesting conditions assumed valid as in your question, I still could not identify a documented version or build that explicitly resolves the complete interrupted-call guarantee.
Within the scope of this forum, this is the extent of the clarification I can substantiate from public documentation. For further clarification of the interrupted-call guarantees, you can submit a request through Windows Developer Support, select the support option that best matches your situation, and describe the scenario you need clarified. Please note that technical support through this channel is paid, incident-based, and requires a Microsoft support contract.
I hope this helps clarify what the available documentation establishes and where further confirmation is needed. If you find this explanation helpful, you’re welcome to follow this guidance so others with the same question find the relevant information.
Thank you.