From 80dce054cb8da4a34b1863a7642baeeebf66ebbe Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 21 Sep 2023 19:35:02 +0400 Subject: Use double-fork when spawning subprocesses Fixes https://github.com/YaLTeR/niri/issues/10 --- src/input.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 310b4f82..3cc13a5f 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1,5 +1,3 @@ -use std::process::Command; - use smithay::backend::input::{ AbsolutePositionEvent, Axis, AxisSource, ButtonState, Device, DeviceCapability, Event, GestureBeginEvent, GestureEndEvent, GesturePinchUpdateEvent as _, GestureSwipeUpdateEvent as _, @@ -19,7 +17,7 @@ use smithay::wayland::tablet_manager::{TabletDescriptor, TabletSeatTrait}; use crate::config::{Action, Config, Modifiers}; use crate::niri::State; -use crate::utils::get_monotonic_time; +use crate::utils::{get_monotonic_time, spawn}; pub enum CompositorMod { Super, @@ -149,9 +147,7 @@ impl State { } Action::Spawn(command) => { if let Some((command, args)) = command.split_first() { - if let Err(err) = Command::new(command).args(args).spawn() { - warn!("error spawning {command}: {err}"); - } + spawn(command, args); } } Action::Screenshot => { -- cgit