JFLib

plat/process_android.rs#

Source: lib/plat/process_android.rs

Android has no child processes for an app (docs/ANDROID.md, "Bewusst nicht", decision 8): from
targetSdk 29 on it executes nothing from writable folders (W^X), only from the APK's folder of
native libraries.  The module is there all the same, so apps build for every target without a
cfg of their own: every start answers ENOTSUP (95), run_elevated an error text, elevated()
false, find() None.  A Child cannot exist (no start succeeds).
/// the error number of every start on Android: ENOTSUP / EOPNOTSUPP ("not supported")
ENOTSUP: u32 = 95
  • struct Child (never made on Android) a child process

impl Child

  • fn read_stdout(&mut self, _bytes: &mut [u8]) -> Result<Option<usize>, u32> read what the child wrote to stdout (never on Android)
  • fn read_stderr(&mut self, _bytes: &mut [u8]) -> Result<Option<usize>, u32> read what the child wrote to stderr (never on Android)
  • fn write_stdin(&mut self, _bytes: &[u8]) -> Result<Option<usize>, u32> write to the child's stdin (never on Android)
  • fn id(&self) -> u32 the child's process id (never on Android)
  • fn close_stdin(&mut self) close the child's stdin (never on Android)
  • fn try_wait(&mut self) -> Result<Option<i32>, u32> whether the child ended, its exit code (never on Android)
  • fn terminate(&mut self) end the child and its tree (never on Android)

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