I have been trying to figure out jobs and processes the past couple of days, and I got processes down (<- pretty much), as for jobs, I am still having trouble.
So, to the point. I am made a quick little program that uses a job to call two processes that open MS Paint and Notepad. Well, I am stuck, and I don't exactly know if I am doing this right...
Well, I don't know what to do next. I don't want to use CreateProcess because I don't think that is what you do for jobs, and you let the jobs do the work. Anyway, can I have some help?
The purpose of jobs is to group related processes(and optionally place restrictions on them), since Windows doesn't maintain parent-child relationships between processes. E.g., if you terminate a process then any "child" processes that it spawned will continue to execute. If you wanted to terminate an entire hierarchy of processes then you'd probably want to first group them into a job.
This is my understanding of jobs. I can say with some certainty though, that there is no good reason to group notepad and mspaint together.