cmd.exe will not terminate under certain conditions when launched with the CreateProcess function

后端 未结 1 1964
抹茶落季
抹茶落季 2021-01-23 01:15

I am executing batch commands via a C program with the CreateProcess function. I check to see if the process has terminated with the GetExitCodeProcess function, by checking to

相关标签:
1条回答
  • 2021-01-23 01:56

    Apparently I have to start to read the stdout/stderr pipe in the loop which checks to see if the process is still running, as well as read it after the process has terminated. Rather than just read it after the process has terminated. Many thanks to Wimmel for posting the answer.

    0 讨论(0)
提交回复
热议问题