Kill kills a job by job number or PID. Just expands the job id expressions %n into PIDs and calls system kill.
(cmdIO *exec.CmdIO, args ...string)
| 92 | // Kill kills a job by job number or PID. |
| 93 | // Just expands the job id expressions %n into PIDs and calls system kill. |
| 94 | func (sh *Shell) Kill(cmdIO *exec.CmdIO, args ...string) error { |
| 95 | if len(args) == 0 { |
| 96 | return fmt.Errorf("cosh kill: expected at least one argument") |
| 97 | } |
| 98 | sh.JobIDExpand(args) |
| 99 | sh.Config.RunIO(cmdIO, "kill", args...) |
| 100 | return nil |
| 101 | } |
| 102 | |
| 103 | // Fg foregrounds a job by job number |
| 104 | func (sh *Shell) Fg(cmdIO *exec.CmdIO, args ...string) error { |
nothing calls this directly
no test coverage detected