You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This reverts commit 0ab61ae, and also
* changes ReadStandardStreams to use ioutils.ReadFile;
* changes the uuid module used by the code (see commit abcb94d).
Using bytes.Buffer instead of plain os.File results in go runtime
creating two sets of pipes and spawning two threads (for stdout and
stderr) that copy the data from the pipe to the buffers.
It is not working when we execute runc create, because it spawns a child
(runc init) whose stdout and stderr are kept connected to the write ends
of the above pipes. As a result, those copying routines never finish,
and cmd.Run() never returns as it waits for those routines.
Therefore, let's go back to using temporary files. Note that the new
code is using ioutil.ReadAll instead of reusing the opened file
descriptors, which seems a bit cleaner.
Signed-off-by: Kir Kolyshkin <[email protected]>
0 commit comments