DeleteJob deletes the given job and returns true if successful,
(cmdIO *exec.CmdIO)
| 430 | |
| 431 | // DeleteJob deletes the given job and returns true if successful, |
| 432 | func (sh *Shell) DeleteJob(cmdIO *exec.CmdIO) bool { |
| 433 | idx := slices.Index(sh.Jobs, cmdIO) |
| 434 | if idx >= 0 { |
| 435 | sh.Jobs = slices.Delete(sh.Jobs, idx, idx+1) |
| 436 | return true |
| 437 | } |
| 438 | return false |
| 439 | } |
| 440 | |
| 441 | // JobIDExpand expands %n job id values in args with the full PID |
| 442 | // returns number of PIDs expanded |