Files
podman/libpod
Matthew Heon c77691f06f Do not error on signalling a just-stopped container
Previous PR #12394 tried to address this, but made a mistake:
containers that have just exited do not move to the Exited state
but rather the Stopped state - as such, the code would never have
run (there is no way we start `podman kill`, and the container
transitions to Exited while we are doing it - that requires
holding the container lock, which Kill already does).

Fix the code to check Stopped as well (we omit Exited entirely
but it's a cheap check and our state logic could change in the
future). Also, return an error, instead of exiting cleanly - the
Kill failed, after all. ErrCtrStateInvalid is already handled by
the sig-proxy logic so there won't be issues.

[NO NEW TESTS NEEDED] This fixes a race that I cannot reproduce
myself, and I have no idea how we'd repro in CI.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-06-09 09:11:18 -04:00
..
2022-03-22 13:04:35 +01:00
2022-01-18 12:47:07 +01:00
2022-05-25 12:26:43 +02:00
2017-11-01 11:24:59 -04:00
2022-04-26 18:12:22 +02:00
2022-05-25 14:10:02 -04:00
2022-01-18 12:47:07 +01:00
2022-01-18 12:47:07 +01:00
2022-04-26 18:12:22 +02:00
2022-05-23 13:59:05 +02:00
2022-05-23 14:11:29 +02:00
2022-05-26 15:46:04 -07:00
2022-04-25 13:23:20 +02:00
2022-04-26 18:12:22 +02:00
2022-01-18 12:47:07 +01:00
2022-05-25 14:10:02 -04:00
2022-01-18 12:47:07 +01:00
2022-01-18 12:47:07 +01:00
2022-05-12 10:51:13 +02:00
2022-02-22 11:05:26 -05:00
2022-05-12 10:51:13 +02:00
2022-04-25 13:23:20 +02:00
2022-02-22 11:05:26 -05:00
2022-06-06 22:08:16 +02:00
2022-01-18 12:47:07 +01:00
2022-01-12 17:07:30 +01:00
2022-01-18 12:47:07 +01:00
2022-01-18 12:47:07 +01:00
2022-04-29 14:06:38 +02:00
2022-01-18 12:47:07 +01:00
2022-04-28 13:29:01 +02:00