bunpen: make pasta logging more verbose

This commit is contained in:
2025-01-05 07:52:19 +00:00
parent 884b99048f
commit 93934eb609

View File

@@ -40,7 +40,7 @@ fn pasta_restrict(net: resources::net_subset) void = {
let (pipe_parent_rd, pipe_child_wr) = unix::pipe()!; let (pipe_parent_rd, pipe_child_wr) = unix::pipe()!;
let (pipe_child_rd, pipe_parent_wr) = unix::pipe()!; let (pipe_child_rd, pipe_parent_wr) = unix::pipe()!;
log::printfln("[namespace/pasta]: forking: child will launch pasta while parent will exec user code"); log::printfln("[namespace/pasta] forking: child will launch pasta while parent will exec user code");
match (ps::fork_and_die_with_parent()) { match (ps::fork_and_die_with_parent()) {
case let child_pid: os::exec::process => case let child_pid: os::exec::process =>
// close the pipe ends which aren't ours // close the pipe ends which aren't ours
@@ -62,6 +62,8 @@ fn pasta_restrict(net: resources::net_subset) void = {
let pasta_pid: [32]u8 = [0...]; let pasta_pid: [32]u8 = [0...];
io::read(pipe_parent_rd, &pasta_pid)!; io::read(pipe_parent_rd, &pasta_pid)!;
log::println("[namespace/pasta] child signaled readiness: continuing");
// cleanup: we're done with the pipes // cleanup: we're done with the pipes
io::close(pipe_parent_wr)!; io::close(pipe_parent_wr)!;
io::close(pipe_parent_rd)!; io::close(pipe_parent_rd)!;