From 0fd357e7f64ec029489bbbcc7935005a26cb9a13 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 23 Oct 2025 08:11:00 +0900 Subject: container/init: do not suspend output Init is not very talkative after process start even when verbose. Suspending output here is pointless and does more harm than good. Signed-off-by: Ophestra --- container/init.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'container/init.go') diff --git a/container/init.go b/container/init.go index 0f5edb19..5c4d2519 100644 --- a/container/init.go +++ b/container/init.go @@ -341,7 +341,6 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) { if err := k.start(cmd); err != nil { k.fatalf(msg, "%v", err) } - msg.Suspend() if err := closeSetup(); err != nil { k.printf(msg, "cannot close setup pipe: %v", err) @@ -401,7 +400,6 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) { select { case s := <-sig: if s == CancelSignal && params.ForwardCancel && cmd.Process != nil { - msg.Resume() msg.Verbose("forwarding context cancellation") if err := k.signal(cmd, os.Interrupt); err != nil { k.printf(msg, "cannot forward cancellation: %v", err) @@ -417,11 +415,7 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) { continue } - if msg.Resume() { - msg.Verbosef("%s after process start", s.String()) - } else { - msg.Verbosef("got %s", s.String()) - } + msg.Verbosef("got %s", s.String()) msg.BeforeExit() k.exit(0) @@ -433,9 +427,6 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) { } if w.wpid == cmd.Process.Pid { - // initial process exited, output is most likely available again - msg.Resume() - switch { case w.wstatus.Exited(): r = w.wstatus.ExitStatus() -- cgit v1.3.1