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.
env
The toolkit’s debug, capture and benchmark knobs: TILO_UI_* variables.
environment
Host inputs: who the process is, where its files live, and how its user asked to be served.
library
Libraries this process opens at run time: code beside the runtime that only some processes need, reached through one exported entry whose type the caller defines.
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.
raise_open_file_limit_to_hard
Raise this process’s soft open-file limit to its hard limit: what a desktop session takes, which holds descriptors for every window it shows (each client’s connection, its buffers and its links). At the 1024 a process starts with, a few dozen windows exhaust it, and then no window, service or person’s request gets through. The apps it starts are held to their own limit by the launcher’s sandbox, never this one.
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