containerd/linux/shim
Michael Crosby 6b4c4a2937 Update reaper for multipe subscribers
Depends on https://github.com/containerd/go-runc/pull/24

The is currently a race with the reaper where you could miss some exit
events from processes.

The problem before and why the reaper was so complex was because
processes could fork, getting a pid, and then fail on an execve before
we would have time to register the process with the reaper.  This could
cause pids to fill up in a map as a way to reduce the race.

This changes makes the reaper handle multiple subscribers so that the
caller can handle locking, for when they want to wait for a specific
pid, without affecting other callers using the reaper code.

Exit events are broadcast to multiple subscribers, in the case, the runc
commands and container pids that we get from a pid-file.  Locking while
the entire container stats no longs affects runc commands where you want
to call `runc create` and wait until that has been completed.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-31 14:29:47 -04:00
..
v1 Add ExitedAt to process proto definition 2017-08-21 08:18:02 -07:00
client_linux.go Add ShimCgroup path for placing shim in cgroup 2017-07-27 15:25:27 -04:00
client_unix.go Add ShimCgroup path for placing shim in cgroup 2017-07-27 15:25:27 -04:00
client.go Update reaper for multipe subscribers 2017-08-31 14:29:47 -04:00
deleted_state.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
exec_state.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
exec.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
init_state.go Update reaper for multipe subscribers 2017-08-31 14:29:47 -04:00
init.go Handle SIGKILL'ed shim while daemon is running 2017-08-29 08:27:44 -07:00
io.go Close stdin on create if it wasn't requested and there's no terminal 2017-05-16 14:16:47 -07:00
local.go Add create/start to exec processes in shim 2017-08-02 13:50:08 -04:00
process.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
service_linux.go use epoll to manage console i/o in linux 2017-07-30 10:50:39 +01:00
service_unix.go use epoll to manage console i/o in linux 2017-07-30 10:50:39 +01:00
service.go Update reaper for multipe subscribers 2017-08-31 14:29:47 -04:00
utils.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00