Question

I am in doubt and hesitate to use it because TerminateProcess is asynchronous (http://msdn.microsoft.com/en-us/library/windows/desktop/ms686714(v=vs.85).aspx) and there is no mention on TerminateJobObject MSDN page that TerminateJobObject is not.

Était-ce utile?

La solution

I suppose that TerminateJobObject does not wait for assigned processes completion and returns immediately like TerminateProcess. I have not any proof and it's just an interpolation of WinAPI style.

Anyway after TerminateJobObject call when all assigned processes are killed the Job Object becomes signal like when assigned processes are terminated by timeout limit. The statement is based on my own experiments. I have not found something about this cases in MSDN.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top