Kill sends a signal to a shell process previously started via "shell.exec". RPC method: session.shell.kill. Parameters: Identifier of a process previously returned by "shell.exec" and the signal to send. Returns: Indicates whether the signal was delivered; false if the process was unknown or alre
(ctx context.Context, params *ShellKillRequest)
| 16693 | // Returns: Indicates whether the signal was delivered; false if the process was unknown or |
| 16694 | // already exited. |
| 16695 | func (a *ShellAPI) Kill(ctx context.Context, params *ShellKillRequest) (*ShellKillResult, error) { |
| 16696 | req := map[string]any{"sessionId": a.sessionID} |
| 16697 | if params != nil { |
| 16698 | req["processId"] = params.ProcessID |
| 16699 | if params.Signal != nil { |
| 16700 | req["signal"] = *params.Signal |
| 16701 | } |
| 16702 | } |
| 16703 | raw, err := a.client.Request(ctx, "session.shell.kill", req) |
| 16704 | if err != nil { |
| 16705 | return nil, err |
| 16706 | } |
| 16707 | var result ShellKillResult |
| 16708 | if err := json.Unmarshal(raw, &result); err != nil { |
| 16709 | return nil, err |
| 16710 | } |
| 16711 | return &result, nil |
| 16712 | } |
| 16713 | |
| 16714 | // Experimental: SkillsAPI contains experimental APIs that may change or be removed. |
| 16715 | type SkillsAPI sessionAPI |