. "$BST_LIB" require dumb-init dumb-init/present # dumb-init is a minimal init / PID-1 signal proxy (compiled C, /sbin), # carried with a wasm32-hwjs patch: the user lane does not service # rt_sigtimedwait, so the recipe replaces upstream's sigwait loop with # sigaction handlers + blocking waitpid, and defaults setsid mode off # (the setsid tty hand-off collapses the console pty on this runtime; # DUMB_INIT_SETSID=1 restores it). Run every case BARE -- do NOT wrap in # `timeout`: its SIGALRM+wait path hangs on this runtime (the # brintos/linux#9 signal breakage), which wedges even working tools. check_out dumb-init/version "dumb-init v" dumb-init -V # Runs a child and proxies its stdout + exit status. check_out dumb-init/run-echo "hello-dumb-init" dumb-init echo hello-dumb-init check dumb-init/rc-zero dumb-init true check_rc dumb-init/rc-proxy 7 dumb-init sh -c 'exit 7' # A signal-killed child must end the supervision loop. Upstream semantics # are 128+signum; this platform's ash reports the TERM self-kill as a # plain exit today, so accept either -- what this case guards is the # supervision loop ending at all (the unpatched tool hung forever here). dumb-init sh -c 'kill -TERM $$' rc=$? if [ "$rc" = 143 ] || [ "$rc" = 0 ]; then bst_ok dumb-init/signal-child else bst_notok dumb-init/signal-child "rc=$rc (want 143 or 0)"; fi