From 19fe3a2bfb72622c307311dc61019238896a756b Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Mon, 22 Feb 2021 09:31:32 -0800 Subject: Fix `runsc kill --pid` Previously, loader.signalProcess was inconsitently using both root and container's PID namespace to find the process. It used root namespace for the exec'd process and container's PID namespace for other processes. This fixes the code to use the root PID namespace across the board, which is the same PID reported in `runsc ps` (or soon will after https://github.com/google/gvisor/pull/5519). PiperOrigin-RevId: 358836297 --- runsc/boot/controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runsc/boot/controller.go') diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go index cb5d8ea31..5e849cb37 100644 --- a/runsc/boot/controller.go +++ b/runsc/boot/controller.go @@ -547,7 +547,8 @@ type SignalArgs struct { // Signo is the signal to send to the process. Signo int32 - // PID is the process ID in the given container that will be signaled. + // PID is the process ID in the given container that will be signaled, + // relative to the root PID namespace, not the container's. // If 0, the root container will be signalled. PID int32 -- cgit v1.2.3