From 707d9db9f1d19df816e30cc2987b809f1801e3ac Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 13 Jul 2020 16:52:19 -0700 Subject: [PATCH] temp debug Signed-off-by: Kir Kolyshkin --- init.go | 5 ++++- libcontainer/logs/logs.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/init.go b/init.go index 08351fdb488..656b689b72c 100644 --- a/init.go +++ b/init.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "runtime" + "time" "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/logs" @@ -31,7 +32,9 @@ func init() { if err != nil { panic(fmt.Sprintf("libcontainer: failed to configure logging: %v", err)) } - logrus.Debug("child process in init()") + logrus.Debug("child process in init(), sleeping ...") + time.Sleep(100 * time.Millisecond) + logrus.Debug("good morning!") } } diff --git a/libcontainer/logs/logs.go b/libcontainer/logs/logs.go index 1077e7b0145..4b22add0d92 100644 --- a/libcontainer/logs/logs.go +++ b/libcontainer/logs/logs.go @@ -35,6 +35,7 @@ func ForwardLogs(logPipe io.Reader) { } if err == io.EOF { logrus.Debugf("log pipe has been closed: %+v", err) + // TODO: signal that we're done return } if err != nil {