gvisor/runsc/cmd
Nicolas Lacasse 31386185fe Push signal-delivery and wait into the sandbox.
This is another step towards multi-container support.

Previously, we delivered signals directly to the sandbox process (which then
forwarded the signal to PID 1 inside the sandbox). Similarly, we waited on a
container by waiting on the sandbox process itself. This approach will not work
when there are multiple containers inside the sandbox, and we need to
signal/wait on individual containers.

This CL adds two new messages, ContainerSignal and ContainerWait. These
messages include the id of the container to signal/wait. The controller inside
the sandbox receives these messages and signals/waits on the appropriate
process inside the sandbox.

The container id is plumbed into the sandbox, but it currently is not used. We
still end up signaling/waiting on PID 1 in all cases.  Once we actually have
multiple containers inside the sandbox, we will need to keep some sort of map
of container id -> pid (or possibly pid namespace), and signal/kill the
appropriate process for the container.

PiperOrigin-RevId: 197028366
Change-Id: I07b4d5dc91ecd2affc1447e6b4bdd6b0b7360895
2018-05-17 11:55:28 -07:00
..
BUILD Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
boot.go Push signal-delivery and wait into the sandbox. 2018-05-17 11:55:28 -07:00
cmd.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
create.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
delete.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
events.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
exec.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
exec_test.go
gofer.go
kill.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
list.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
path.go
ps.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
run.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
start.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00
state.go Refactor the Sandbox package into Sandbox + Container. 2018-05-15 10:18:03 -07:00