Skip to main content

Module process

Module process 

Source
Expand description

Cross-platform process abstraction

Provides a unified interface for discovering and managing processes across macOS, Linux, and Windows.

Structs§

Process
Represents a system process with relevant information
RawText
The text of a process that name matching reads, as the OS gave it: control characters unescaped, unlike the fields a process is displayed from

Enums§

ProcessStatus
Process status

Functions§

escape_control
Make text from other processes safe to print: control characters become visible escapes, as lsof and ps do. Names, command lines and paths are set by whoever runs a process, and printed raw an ESC sequence could recolour, retitle or rewrite the terminal of whoever runs proc (and a newline would split a table row). Applied where process data is read, so every view and the JSON show the same text.
is_thread
On Linux, sysinfo lists every thread of a process as an entry of its own, with the process’s command line, so a node server shows up a dozen times. Process listings skip them; thread_kind is always None elsewhere.
parse_signal_name
Parse a signal name to a nix Signal (Unix only)