Handles in the child process

How the handles are managed in the child process?

E

Expert

Verified

The operating system forms the new child process but does not let the child process to start executing its code right away. Of course, the system form a new, empty process handle table for the child process just as it would for any new process. But since you passed TRUE to CreateProcess’s inherit Handles parameter, the system does one more thing: this walks the parent process’s handle table, and for each entry it determines that contains a valid inheritable handle, the system copies the entry exactly into the child process’s handle table. The entry is copied to the exact similar position in the child process’s handle table as in the parent’s handle table.

   Related Questions in Science

©TutorsGlobe All rights reserved 2022-2023.