MCPcopy Create free account
hub / github.com/cogentcore/core / Kill

Method Kill

shell/builtins.go:94–101  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

92// Kill kills a job by job number or PID.
93// Just expands the job id expressions %n into PIDs and calls system kill.
94func (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
104func (sh *Shell) Fg(cmdIO *exec.CmdIO, args ...string) error {

Callers

nothing calls this directly

Calls 3

JobIDExpandMethod · 0.95
RunIOMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected