I would only add one thing to catkin's suggestion.
You are launching 100,000 programs. It's very likely that multiple programs will reuse PIDs. If your individual programs finish fast enough, it is conceivable that you could kill the wrong process. Take for example:
Time 0: Program 1 starts - uses PID 90 - 120 second timer begins
Time 2-4: <Other programs launched>
Time 5: Program 1 completes (timer continues to run)
Time 6: <Other programs launched>
Time 115: Program 32769 starts - uses PID 90
Time 120: Original timer for Program 1 ends - kills PID 90 - PID 90 now belongs to Program 32769 - Program 32769 improperly killed after 5 seconds
Depending on how quickly each of the individual programs in your 100,000 run, the above sequence may (or may not) be likely. You may need to perform some additional checking before you kill a specific process (like verifying each PID's start time before killing).