File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ func main() {
110110 stderr .Close ()
111111 }()
112112
113+ // redirect the following output into fifo to make sure that containerd
114+ // still can read the log after restart
115+ logrus .SetOutput (stdout )
116+
113117 if err := executeShim (); err != nil {
114118 fmt .Fprintf (os .Stderr , "containerd-shim: %s\n " , err )
115119 os .Exit (1 )
@@ -119,7 +123,7 @@ func main() {
119123// If containerd server process dies, we need the shim to keep stdout/err reader
120124// FDs so that Linux does not SIGPIPE the shim process if it tries to use its end of
121125// these pipes.
122- func openStdioKeepAlivePipes (dir string ) (io.ReadCloser , io.ReadCloser , error ) {
126+ func openStdioKeepAlivePipes (dir string ) (io.ReadWriteCloser , io.ReadWriteCloser , error ) {
123127 background := context .Background ()
124128 keepStdoutAlive , err := shimlog .OpenShimStdoutLog (background , dir )
125129 if err != nil {
You can’t perform that action at this time.
0 commit comments