CreateProcess and console handles

This is a discussion on CreateProcess and console handles within the Windows Programming forums, part of the Platform Specific Boards category; Hello, everyone! I hope you can help me with this one...
What I want to do is create a console ...

CreateProcess and console handles

Hello, everyone! I hope you can help me with this one...
What I want to do is create a console application that would process user input and then spawn other console applications in the same console window. So I write something like this:

The problem is, after the spawned process ends, the console stops receiving keyboard input (the output still works). I used to think that the child process closes the input handles when it finishes, but I realised that bInheritHandles parameter to CreateProcess() is set to FALSE, so that's not what causes the freeze. What can I do about it?