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/cmd/kill.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runsc/cmd') diff --git a/runsc/cmd/kill.go b/runsc/cmd/kill.go index aecf0b7ab..e0df39266 100644 --- a/runsc/cmd/kill.go +++ b/runsc/cmd/kill.go @@ -52,7 +52,7 @@ func (*Kill) Usage() string { // SetFlags implements subcommands.Command.SetFlags. func (k *Kill) SetFlags(f *flag.FlagSet) { f.BoolVar(&k.all, "all", false, "send the specified signal to all processes inside the container") - f.IntVar(&k.pid, "pid", 0, "send the specified signal to a specific process") + f.IntVar(&k.pid, "pid", 0, "send the specified signal to a specific process. pid is relative to the root PID namespace") } // Execute implements subcommands.Command.Execute. -- cgit v1.2.3