3

I have a process manager. It might create thousands (on paper!) of child processes using createprocess function. Currently I'm using mufti-threading and WiatForMultipleObejct in order to detect exit or failure of any of the children.

I was looking for some advice/guideline/pseud-code/link to detect the exit of child process using IOCP if it is possible at all!?

Thanks a lot!

happyNewLife
  • 87
  • 1
  • 9

1 Answers1

1

Yes, it's possible.

You need to take a look at the Job Object API. Specifically you create you process, assign it to a job and then associate the job with a completion port. See JOBOBJECT_ASSOCIATE_COMPLETION_PORT and SetInformationJobObject()

Len Holgate
  • 21,282
  • 4
  • 45
  • 92
  • Thanks, I found a solution for it. This is an old question! But thank you. The solution is similar to your suggestion. – happyNewLife Aug 07 '13 at 10:45