Skip to content

Commit

Permalink
fix: process stop
Browse files Browse the repository at this point in the history
Signed-off-by: tiny-x <xf.yefei@gmail.com>
  • Loading branch information
tiny-x committed Apr 29, 2022
1 parent b09f8eb commit 532db5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exec/process/process_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ func (spe *StopProcessExecutor) Exec(uid string, ctx context.Context, model *spe
}
pids := resp.Result.(string)
if _, ok := spec.IsDestroy(ctx); ok {
return spe.channel.Run(ctx, "kill", fmt.Sprintf("-STOP %s", pids))
} else {
return spe.channel.Run(ctx, "kill", fmt.Sprintf("-CONT %s", pids))
} else {
return spe.channel.Run(ctx, "kill", fmt.Sprintf("-STOP %s", pids))
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/chaosblade-io/chaosblade-exec-os
go 1.13

require (
github.com/chaosblade-io/chaosblade-spec-go v1.5.1-0.20220403044331-978f0910eaf3
github.com/chaosblade-io/chaosblade-spec-go v1.5.1-0.20220423030509-6d8dbd90b300
github.com/containerd/cgroups v1.0.2-0.20210605143700-23b51209bf7b
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
github.com/shirou/gopsutil v3.21.6+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/chaosblade-io/chaosblade-spec-go v1.5.1-0.20220403044331-978f0910eaf3 h1:rlYv6takbMcRXPN9X6PlpTpkUFigVfHJEZ8ETjiSpks=
github.com/chaosblade-io/chaosblade-spec-go v1.5.1-0.20220403044331-978f0910eaf3/go.mod h1:977aR5J4BBfLtFkYZkbHv1i7NJYN1X0x85xO3b8YLpc=
github.com/chaosblade-io/chaosblade-spec-go v1.5.1-0.20220423030509-6d8dbd90b300 h1:zHZkTkuMHbeSOZ/vXYgo+0p/qFfLaXQdwKyAFh75hyA=
github.com/chaosblade-io/chaosblade-spec-go v1.5.1-0.20220423030509-6d8dbd90b300/go.mod h1:977aR5J4BBfLtFkYZkbHv1i7NJYN1X0x85xO3b8YLpc=
github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
github.com/containerd/cgroups v1.0.2-0.20210605143700-23b51209bf7b h1:mrRq0rkLJnQOfalr7EwNn1ULsMoyGvD+8kN+hxeNRms=
github.com/containerd/cgroups v1.0.2-0.20210605143700-23b51209bf7b/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU=
Expand Down

0 comments on commit 532db5d

Please sign in to comment.