Expand description
The current process, with one API on every target.
On Linux and macOS an app runs as an OS process with an id; in the browser it runs
inside the page, which has none, so the functions here answer None rather than
panicking as std::process::id does.
Modules§
- child
- Waiting on a child process without polling it.
- confinement
- Whether this process could build the user and mount namespace a confined guest needs: not under a seccomp filter, with unprivileged user namespaces allowed.
- descriptor
- Whether a raw descriptor number names a descriptor this process still has open.
- environment
- Host inputs: who the process is, where its files live, and how its user asked to be served.
- local_
socket - Connecting to a service socket that only this user can have created.
- login_
shell - pty
- A pseudo-terminal master whose size and foreground process group are asked of the OS.
- rendezvous
- One owner process per resource; every other process connects to it.
- shared_
memory - Memory shared with a child process this one starts.
- tools
- Where a person’s command-line tools live.
Enums§
Functions§
- availability
- available
- effective_
uid - id
- The current process’s OS id, or
Nonewhere apps do not run as OS processes (the browser). - identity_
names - Whether
record, asidentity_recordwrote it, names the processpidthat is alive now: a process that reused the id has another start time, so its predecessor’s record never names it. Anything but the one record shape isfalse. - identity_
record - One line naming the live process
pid: its id andstart_time, asidentity_namesreads it back.Nonewhere the system cannot see the process. - open_
file_ count - How many files
pidhas open, where the system says (Linux’s/proc/<pid>/fd).Noneelsewhere, and when the process has exited or its table is unreadable; never a made-up zero. - probe_
process_ table - Whether this process may read the system’s process table: the read error on Linux,
Okwhere no separate table exists to fail, so an empty list can be told apart from a denied one. - raise_
open_ file_ limit - Raise this process’s soft open-file limit to the 1024 descriptors a Linux app starts with, as far as the hard limit allows; macOS starts processes at 256, which one app retaining a descriptor per selected file exhausts.
- start_
time - The kernel’s start time for
pid, the value that tells a live process from another that reused its id.Nonewhere the system has no process table, or the process is gone: one that exited and was not reaped yet (a zombie) still has its table entry, but does nothing and holds nothing, so it is gone too. - uid