From 199c22b2e5188acee4b38a373ab3e4cf978c7f94 Mon Sep 17 00:00:00 2001 From: zhongjiawei Date: Mon, 17 Oct 2022 16:26:48 +0800 Subject: [PATCH] runc: print error message during start into container log --- runc-1.1.3/init.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runc-1.1.3/init.go b/runc-1.1.3/init.go index bddc237..a0520b5 100644 --- a/runc-1.1.3/init.go +++ b/runc-1.1.3/init.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "os" "runtime" "strconv" @@ -34,6 +35,7 @@ func init() { factory, _ := libcontainer.New("") if err := factory.StartInitialization(); err != nil { + fmt.Fprintf(os.Stderr, "libcontainer: container start initialization failed: %s", err) // as the error is sent back to the parent there is no need to log // or write it to stderr because the parent process will handle this os.Exit(1) -- 2.30.0