Skip to main content

Crate hyprforge_process

Crate hyprforge_process 

Source
Expand description

Running a subprocess that might not come back.

Command::output() waits forever. Every external program this project talks to — hyprctl, gsettings, fc-list — is one that can stop answering: a wedged compositor, a hung dconf, an NFS home directory. Waiting forever on any of them means an app that has to be killed, and for a login screen it would mean nobody can log in.

That is the same shape of mistake as waiting forever for a compositor to grant a session lock, which cost five visible seconds before anyone noticed. Unbounded waits on another process are worth treating as a category.

Deliberately not in hyprforge-paths, which has no dependencies and is about where files live: this is about talking to another process, not about the filesystem. It used to live in hyprforge-core, on the theory that every caller already depended on that crate — but hyprforge-network, hyprforge-bluetooth and hyprforge-power are clients of other daemons (NetworkManager, BlueZ, systemd-logind) with no Hyprland config to read or write, and pulling in 4,000+ lines of hlconfig/hyprlang/lua machinery for a bounded-subprocess helper made the layering a lie. This crate has no workspace dependencies at all, same as hyprforge-paths, so a non-Hyprland app can use it without dragging in Hyprland at all. hyprforge-core re-exports this module as hyprforge_core::command so existing call sites keep working; new code should depend on hyprforge-process directly.

Constants§

TIMEOUT
Long enough that a busy machine is not cut off, short enough that a person does not conclude the app is broken.

Functions§

output
Like Command::output, but gives up.