Skip to main content

Crate tilo_process

Crate tilo_process 

Source
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§

Availability
Feature

Functions§

availability
available
effective_uid
id
The current process’s OS id, or None where apps do not run as OS processes (the browser).
identity_names
Whether record, as identity_record wrote it, names the process pid that 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 is false.
identity_record
One line naming the live process pid: its id and start_time, as identity_names reads it back. None where the system cannot see the process.
open_file_count
How many files pid has open, where the system says (Linux’s /proc/<pid>/fd). None elsewhere, 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, Ok where 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. None where 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