session: Make sure to mark the socket as CLOEXEC early
This commit is contained in:
parent
4df95190db
commit
769ca13647
2 changed files with 22 additions and 11 deletions
|
|
@ -73,7 +73,7 @@ impl State {
|
|||
|
||||
// potentially tell the session we are setup now
|
||||
if let Err(err) =
|
||||
session::setup_socket(self.common.event_loop_handle.clone(), &self.common)
|
||||
session::run_socket(self.common.event_loop_handle.clone(), &self.common)
|
||||
{
|
||||
warn!(?err, "Failed to setup cosmic-session communication");
|
||||
}
|
||||
|
|
@ -147,6 +147,11 @@ pub fn run(hooks: crate::hooks::Hooks) -> Result<(), Box<dyn Error>> {
|
|||
tracy_client::Client::start();
|
||||
|
||||
utils::rlimit::increase_nofile_limit();
|
||||
// This needs to be done before any potential program launches
|
||||
// (e.g. Xwayland) as it handles passed file descriptors.
|
||||
if let Err(err) = session::setup_socket() {
|
||||
warn!("Session error: {:?}", err);
|
||||
};
|
||||
|
||||
// init hook globals
|
||||
hooks::HOOKS.set(hooks)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue