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