libc/process.kur
//! Other programs and the hash seed, the C half of `std::process`.
// process.c, and start.c's hash seed. The rest of start.c, start-up and
// the report of an entry's error, is called by the C `main` the compiler
// writes, not by Kursal code.
/// Starts the program the command line names: `count` arguments, each its
/// bytes and a NUL, `len` bytes in all; its environment changed by the
/// `env_ops` operations `env` holds; in the directory `dir` unless it is
/// NULL; with each standard stream as `streams` says, where this process's
/// end of each pipe made comes back. The child's process id, or a negative
/// errno.
extern "C" fn kur_libc_process_spawn(line: *u8, len: usize, count: usize, env: *u8, env_len: usize, env_ops: usize, env_clear: u8, dir: *u8, dir_len: usize, streams: *i32) -> i64;
/// Waits for the child, or with `block` 0 only looks: its exit status, 256
/// plus the number of the signal that ended it, 512 while it runs, or a
/// negative errno.
extern "C" fn kur_libc_process_wait(pid: i64, block: u8) -> i64;
/// SIGKILL to the child: 0 or the errno.
extern "C" fn kur_libc_process_kill(pid: i64) -> i32;
/// The signal numbered `signal` to the child: 0 or the errno.
extern "C" fn kur_libc_process_signal(pid: i64, signal: i32) -> i32;
/// Waits until descriptor `a` or `b` can be read: bit 0 for `a`, bit 1 for
/// `b`, or a negative errno. A negative descriptor is passed over.
extern "C" fn kur_libc_process_poll(a: i32, b: i32) -> i32;
/// The processors the process may run on, at least 1.
extern "C" fn kur_libc_process_cpus() -> usize;
/// C's `exit(status)`, run by the first call only: a later call, from any
/// thread, never returns.
extern "C" fn kur_libc_process_exit(status: i32) -> !;
/// Word `word` (0 or 1) of the hash seed start-up drew; the process aborts
/// when start-up never ran.
extern "C" fn kur_libc_process_hash_seed(word: u32) -> u64;