Support `std::process`
sunfishcode opened this issue · comments
Dan Gohman commented
Support std::process
, including Command
.
- Determine which system calls are needed. A first step might be to try to run tests/examples.rs under a mustang target, or Rust's process tests, and see what unimplemented functions are called.
- Add the system calls to rustix.
- Replace the
unimplemented!
code in c-scape with calls torsix
- For
fork
, we'll need to implement__register_atfork
too, which will need something like astatic OnceCell<Mutex<Vec<...>>>
similar toDTORS
in origin/src/programs.rs. It may make sense for this andfork
itself to live in origin too, with c-scape providing just the C-ABI wrapper around it. - Add Rusts's process tests as tests/process.rs, with a comment at the top similar to tests/fs.rs.
If anyone's interested in working on any part of this, please leave a comment here! Or stop by Zulip. I'm happy to mentor, answer questions, explain what fork
is, or, on the other hand, have an in-depth discussion about the relationship between fork
, ambient authority, and operating system API design.