main: Increase soft file limit

This commit is contained in:
Victoria Brekenfeld 2024-04-03 18:08:43 +02:00 committed by Victoria Brekenfeld
parent fa7926f7c1
commit 6ba7242cfc
6 changed files with 60 additions and 21 deletions

View file

@ -74,6 +74,7 @@ use std::{
any::Any,
cell::RefCell,
collections::HashMap,
os::unix::process::CommandExt,
thread,
time::{Duration, Instant},
};
@ -2303,6 +2304,7 @@ impl State {
.env("XDG_ACTIVATION_TOKEN", &*token)
.env("DESKTOP_STARTUP_ID", &*token)
.env_remove("COSMIC_SESSION_SOCK");
unsafe { cmd.pre_exec(|| Ok(crate::utils::rlimit::restore_nofile_limit())) };
std::thread::spawn(move || match cmd.spawn() {
Ok(mut child) => {