Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stdio: sometimes quit main loop after io is done
in the event of a non-terminal, api v1 exec session, we need to run the main_loop a second time to make sure we get all output from the i/o pipes connected to the container. However, occasionally, the container process will finish before this main loop is called. We catch it when we check the child processes immediately preceeding the g_main_loop_run, but that gives no way to exit the main loop (as we've already removed container_exit_cb as a source. The solution here is to exit the main loop if we get to stdio_cb, the first i/o pipe has been closed (either stderr or stdout, doesn't matter the order), and we know the container_status. this allows us to read all the i/o, but still properly exit conmon Signed-off-by: Peter Hunt <[email protected]>
- Loading branch information