Files
Paul Holzinger fbed3a01d2 wait: fix handling of multiple conditions with exited
As it turns on things are not so simple after all...
In podman-py it was reported[1] that waiting might hang, per our docs wait
on multiple conditions should exit once the first one is hit and not all
of them. However because the new wait logic never checked if the context
was cancelled the goroutine kept running until conmon exited and because
we used a waitgroup to wait for all of them to finish it blocked until
that happened.

First we can remove the waitgroup as we only need to wait for one of
them anyway via the channel. While this alone fixes the hang it would
still leak the other goroutine. As there is no way to cancel a goroutine
all the code must check for a cancelled context in the wait loop to no
leak.

Fixes 8a943311db ("libpod: simplify WaitForExit()")
[1] https://github.com/containers/podman-py/issues/425

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-17 17:35:17 +02:00
..
2024-02-08 09:35:39 -05:00
2024-09-03 15:14:15 +02:00
2024-04-19 09:52:14 +02:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-06-21 10:07:55 +02:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-12 09:13:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-09-03 15:14:15 +02:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-09-03 15:14:15 +02:00
2024-02-08 09:35:39 -05:00
2024-08-16 15:34:16 +02:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-04-13 15:20:19 +08:00
2024-04-13 15:20:19 +08:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00