Job Notifications
At this point, you certainly know the basics about job objects; the only thing left to cover is notifications. For example, wouldn’t you like to know when all the processes in the job terminate or if all the allotted CPU time has expired? Or maybe you’d like to know when a new process is spawned within a job or when a process in the job terminates. If you don’t care about these notifications—and many applications won’t care—working with jobs is as easy as what I’ve already described. If you do care about these events, you have a little more to do.
If all you care about is whether all the allotted CPU time has expired, you can easily get this notification. Job objects are nonsignaled while the processes in the job have not used ...
Get Windows® via C/C++, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.