aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/init/main.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-10-26 23:09:32 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-10-26 23:09:32 +0900
commitae1a102882103221ef842176dfd8cb1090d5f591 (patch)
tree16f34686bac5564998a9a0e84be96d83ed3e59bd /internal/init/main.go
parent093e99d062f873dc9d83b1f76a156c1ee4275c57 (diff)
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 <cat@ophivana.moe>
Diffstat (limited to 'internal/init/main.go')
-rw-r--r--internal/init/main.go6
1 files changed, 3 insertions, 3 deletions
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)
}
}
}