| 25 | ) |
| 26 | |
| 27 | func (daemon *Daemon) registerExecCommand(container *container.Container, config *container.ExecConfig) { |
| 28 | // Storing execs in container in order to kill them gracefully whenever the container is stopped or removed. |
| 29 | container.ExecCommands.Add(config.ID, config) |
| 30 | // Storing execs in daemon for easy access via Engine API. |
| 31 | daemon.execCommands.Add(config.ID, config) |
| 32 | } |
| 33 | |
| 34 | // ExecExists looks up the exec instance and returns a bool if it exists or not. |
| 35 | // It will also return the error produced by `getConfig` |