Terminating All Processes in a Job

Well, certainly one of the most popular things that you will want to do with a job is kill all the processes within it. At the beginning of this chapter, I mentioned that Visual Studio doesn’t have an easy way to stop a build that is in progress because it would have to know which processes were spawned from the first process that it spawned. (This is very tricky. I explain how Developer Studio accomplished this in my Win32 Q & A column in the June 1998 issue of Microsoft Systems Journal, readable at http://www.microsoft.com/msj/0698/win320698.aspx.) Maybe future versions of Visual Studio will use jobs instead because the code is a lot easier to write and you can do much more with it.

To kill all the processes ...

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.