JFLib

plat/process_win.rs (Windows)#

Source: lib/plat/process_win.rs

Windows child pipes and job ownership; no console window and only explicit handles inherited.
  • struct Child Native child with captured output and a kill-on-close Windows job.

impl Child

  • fn id(&self) -> u32 The child's process id (as plat::process_alive takes it).
  • fn read_stdout(&mut self, bytes: &mut [u8]) -> Result<Option<usize>, u32> Read stdout without waiting; None means no data, Some(0) means EOF.
  • fn read_stderr(&mut self, bytes: &mut [u8]) -> Result<Option<usize>, u32> Read stderr without waiting; None means no data, Some(0) means EOF.
  • fn write_stdin(&mut self, bytes: &[u8]) -> Result<Option<usize>, u32> Write a small chunk to stdin. Call from an IO worker, not the UI thread.
  • fn close_stdin(&mut self) Close stdin to request orderly helper shutdown.
  • fn try_wait(&mut self) -> Result<Option<i32>, u32> Return the child exit status without blocking.
  • fn terminate(&mut self) Terminate all processes in the owned job.

Source: docs/API.md in the JFLib repository.