exec_tool_helper_kill.go 374 B

12345678910111213141516171819
  1. package executor
  2. import (
  3. "context"
  4. "os/exec"
  5. )
  6. func runExecToolHelperKillCommand(attrs map[string]string) {
  7. helper, killID := "", ""
  8. if attrs != nil {
  9. helper = attrs["helper"]
  10. killID = attrs["kill_id"]
  11. }
  12. if helper == "" || killID == "" {
  13. return
  14. }
  15. killCmd := exec.CommandContext(context.Background(), "olivetin-"+helper, "kill", killID)
  16. _ = killCmd.Run()
  17. }