Windows Programming Question:

Download Job Interview Questions and Answers PDF

How the handles are handled in the child process?

Windows Programming Interview Question
Windows Programming Interview Question

Answer:

The operating system creates the new child process but does not allow the child process to begin executing its code right away. Of course, the system creates a new, empty process handle table for the child process just as it would for any new process. But because you passed TRUE to CreateProcess’s bInheritHandles parameter, the system does one more thing: it walks the parent process’s handle table, and for each entry it finds 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 same position in the child process’s handle table as in the parent’s handle table.

Download Windows Programming Interview Questions And Answers PDF

Previous QuestionNext Question
What about the usage count in the parent child process tables?What is Mutex Object and why it is used?