Expand description
Single-Instance Mutex and Inter-Process Communication (IPC) Window Focusing.
Prevents duplicate application processes from opening when an executable is launched repeatedly, automatically forwarding CLI arguments to the primary instance and requesting window focusing / un-minimization.
Unix hosts use a domain socket in $XDG_RUNTIME_DIR (falling back to /tmp). Windows
hosts use a named pipe at \\.\pipe\<sanitized-app-id>. Both transports forward
newline-separated CLI arguments to the primary instance.
Structs§
- Single
Instance Lock - Mutex handle holding the single-instance lock and IPC listener thread.
Enums§
- Single
Instance Status - Status result when attempting to acquire a single-instance application lock.
Functions§
- decode_
args - Decodes arguments from the length-prefixed binary wire format.
- encode_
args - Serializes a slice of arguments into length-prefixed binary wire format.