Aug-30-2019, 12:16 AM
i have started about 20 processes using
subprocess.Popen(command,stdout=PIPE)
and have gotten EOF on all their pipes. now i want the parent script to wait for all of them to exit. for various reasons some could take several minutes to exit. i'd like to allow up to 5 minutes for the whole bunch. is there a way to wait for them all as a group with just a single timeout? normally i would just for loop through the list of objects i got from Popen and call each.join()
. but putting the 300 second timeout in there could end up being a long time if several are slow. is there a better way to wait for them all while giving up after 5 minutes?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.