Use rustix/libc instead of nix; use pipe to capture double-fork pid

`rustix` and `libc` are already in the dependency tree, and `rustix`
follows IO safety rules, so use those.

We can use a pipe to get the PID of the double-forked process.
This commit is contained in:
Ian Douglas Scott 2024-07-24 18:06:11 -07:00 committed by Ian Douglas Scott
parent a5996b4e90
commit fe035e37b0
2 changed files with 38 additions and 18 deletions

View file

@ -24,7 +24,7 @@ debug = ["iced/debug"]
# Enables pipewire support in ashpd, if ashpd is enabled
pipewire = ["ashpd?/pipewire"]
# Enables process spawning helper
process = ["dep:nix"]
process = ["dep:libc", "dep:rustix"]
# Use rfd for file dialogs
rfd = ["dep:rfd"]
# Enables desktop files helpers
@ -83,10 +83,11 @@ derive_setters = "0.1.5"
fraction = "0.14.0"
image = { version = "0.25.1", optional = true }
lazy_static = "1.4.0"
libc = { version = "0.2.155", optional = true }
mime = { version = "0.3.17", optional = true }
nix = { version = "0.27", features = ["process"], optional = true }
palette = "0.7.3"
rfd = { version = "0.14.0", optional = true }
rustix = { version = "0.38.34", features = ["pipe", "process"], optional = true }
serde = { version = "1.0.180", features = ["derive"] }
slotmap = "1.0.6"
textdistance = { version = "1.0.2", optional = true }