diff options
author | Matthew Heon <mheon@redhat.com> | 2021-01-25 15:29:00 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-01-25 15:44:42 -0500 |
commit | 5350254f0578162c226f8990f9835b7920bf9835 (patch) | |
tree | 7432c1a3cdea333189f2af5d50264342dab3e6f7 /libpod/runtime_volume_linux.go | |
parent | f4e857245ab5ad414c466158775b14eeb268181d (diff) | |
download | podman-5350254f0578162c226f8990f9835b7920bf9835.tar.gz podman-5350254f0578162c226f8990f9835b7920bf9835.tar.bz2 podman-5350254f0578162c226f8990f9835b7920bf9835.zip |
Ensure shutdown handler access is syncronized
There was a potential race where two handlers could be added at
the same time. Go Maps are not thread-safe, so that could do
unpleasant things. Add a mutex to keep things safe.
Also, swap the order or Register and Start for the handlers in
Libpod runtime created. As written, there was a small gap between
Start and Register where SIGTERM/SIGINT would be completely
ignored, instead of stopping Podman. Swapping the two closes this
gap.
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/runtime_volume_linux.go')
0 files changed, 0 insertions, 0 deletions