Close closes any resources associated with the shell, including terminating any commands that are not running "nohup" in the background.
()
| 157 | // including terminating any commands that are not running "nohup" |
| 158 | // in the background. |
| 159 | func (sh *Shell) Close() { |
| 160 | sh.CloseSSH() |
| 161 | // todo: kill jobs etc |
| 162 | } |
| 163 | |
| 164 | // CloseSSH closes all open ssh client connections |
| 165 | func (sh *Shell) CloseSSH() { |