Reputation: 3201
When analyzing the process tree in C++, POSIX allows you to prune it using group ID. Several processes may be added to a particular group.
Eg. see the following POSIX function.
Does Windows have an equivalent of the above? I would like to assign a bunch of processes I own to a group, and then control the group as a whole.
Eg.
kill all processes in my group
Upvotes: 1
Views: 297
Reputation: 40911
Windows has process groups which each newly created child process is added to unless it is created with the CREATE_NEW_PROCESS_GROUP
flag. This is only useful for the GenerateConsoleCtrlEvent
function as far as I know.
Job objects might be more useful to you. For example, you can kill all process associated with a given job with TerminateJobObject
.
Upvotes: 2