From ae1a102882103221ef842176dfd8cb1090d5f591 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sat, 26 Oct 2024 23:09:32 +0900 Subject: fmsg: support temporarily withholding output Trying to print to a shared stdout is a terrible idea. This change makes it possible to withhold output for the lifetime of the sandbox. Signed-off-by: Ophestra Umiker --- internal/init/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/init') diff --git a/internal/init/main.go b/internal/init/main.go index 7a340a8e..f2927728 100644 --- a/internal/init/main.go +++ b/internal/init/main.go @@ -129,7 +129,7 @@ func doInit(fd uintptr) { select { case s := <-sig: fmsg.VPrintln("received", s.String()) - os.Exit(0) + fmsg.Exit(0) case w := <-info: if w.wpid == cmd.Process.Pid { switch { @@ -147,10 +147,10 @@ func doInit(fd uintptr) { }() } case <-done: - os.Exit(r) + fmsg.Exit(r) case <-timeout: fmsg.Println("timeout exceeded waiting for lingering processes") - os.Exit(r) + fmsg.Exit(r) } } } -- cgit v1.3.1