What I would like to do is run several things in the background, and capturing the output of each in a safe way. Needs to be safe in case if reentrancy, in case the tool ever getting run twice simultaneously, a problem which I presume could easily be dealt with by decorating things with the current pid. The thing I have no idea about is how to wait on all of some sub processes, need to wait until all of them have completed.
(The WinNT API has nice calls to do exactly this kind of thing, waiting on a number of asynchronous events of all types, such as timers, mouse and keyboard events, resumabke events related to processes too I suppose. All fine if you are writing stuff in C say, But I never managed to solve this problem with NT batch files nor Powershell scripts as my knowledge did not stretch far enough and MS never bothered to put anything nice and easy for such a thing into their shells. They have the start and start /wait commands but if you did a start there was no way that I knew to get an event telling you the process had finished.)