Fix infinite loop

Since we never remove thread from the list of thread, podman-compose
up never return as long as 1 thread is alive.
This commit is contained in:
Michael Scherer 2020-06-02 21:39:22 +02:00 committed by Muayyad Alsadi
parent d3f37112a7
commit 105b129b08

View File

@ -1151,10 +1151,11 @@ def compose_up(compose, args):
thread.start() thread.start()
threads.append(thread) threads.append(thread)
time.sleep(1) time.sleep(1)
while True: while threads:
for thread in threads: for thread in threads:
thread.join(timeout=1.0) thread.join(timeout=1.0)
if thread.is_alive(): continue if not thread.is_alive():
threads.remove(thread)
if args.abort_on_container_exit: if args.abort_on_container_exit:
exit(-1) exit(-1)