mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
exec: get the exit code from sync pipe instead of file
Before, we were getting the exit code from the file, in which we waited an arbitrary amount of time (5 seconds) for the file, and segfaulted if we didn't find it. instead, we should be a bit more certain conmon has sent the exit code. Luckily, it sends the exit code along the sync pipe fd, so we can read it from there Adapt the ExecContainer interface to pass along a channel to get the pid and exit code from conmon, to be able to read both from the pipe Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
@ -121,8 +121,8 @@ func (r *MissingRuntime) AttachResize(ctr *Container, newSize remotecommand.Term
|
||||
}
|
||||
|
||||
// ExecContainer is not available as the runtime is missing
|
||||
func (r *MissingRuntime) ExecContainer(ctr *Container, sessionID string, options *ExecOptions) (int, chan error, error) {
|
||||
return -1, nil, r.printError()
|
||||
func (r *MissingRuntime) ExecContainer(ctr *Container, sessionID string, options *ExecOptions) (chan DataAndErr, chan error, error) {
|
||||
return nil, nil, r.printError()
|
||||
}
|
||||
|
||||
// ExecStopContainer is not available as the runtime is missing.
|
||||
|
Reference in New Issue
Block a user