forked from extern/podman-compose
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:
parent
d3f37112a7
commit
105b129b08
@ -1151,12 +1151,13 @@ 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():
|
||||||
if args.abort_on_container_exit:
|
threads.remove(thread)
|
||||||
exit(-1)
|
if args.abort_on_container_exit:
|
||||||
|
exit(-1)
|
||||||
|
|
||||||
@cmd_run(podman_compose, 'down', 'tear down entire stack')
|
@cmd_run(podman_compose, 'down', 'tear down entire stack')
|
||||||
def compose_down(compose, args):
|
def compose_down(compose, args):
|
||||||
|
Loading…
Reference in New Issue
Block a user