From 722aca5e1db710135ed0ed9e14408c37b8b43bd0 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Thu, 18 Jan 2024 16:01:02 +0800 Subject: [PATCH] fix getting process name Signed-off-by: SSpirits --- pkg/server/chaosd/process.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/server/chaosd/process.go b/pkg/server/chaosd/process.go index 38d1b594..dc02ce9a 100644 --- a/pkg/server/chaosd/process.go +++ b/pkg/server/chaosd/process.go @@ -44,8 +44,9 @@ func (processAttack) Attack(options core.AttackConfig, _ Environment) error { for _, p := range processes { pid := int(p.Pid) name, err := p.Name() + // If we can't get the name of the process, we just skip it. if err != nil { - return errors.WithStack(err) + continue } if attack.Process == strconv.Itoa(pid) || attack.Process == name {