WithProcessKill should kill all processes.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2017-08-28 18:38:47 +00:00
parent 31b5bb9107
commit 2f237b2fde

View File

@ -41,7 +41,7 @@ func WithProcessKill(ctx context.Context, p Process) error {
if err != nil { if err != nil {
return err return err
} }
if err := p.Kill(ctx, syscall.SIGKILL); err != nil { if err := p.Kill(ctx, syscall.SIGKILL, WithKillAll); err != nil {
if errdefs.IsFailedPrecondition(err) || errdefs.IsNotFound(err) { if errdefs.IsFailedPrecondition(err) || errdefs.IsNotFound(err) {
return nil return nil
} }