[gnome-shell/benzea/systemd-scopes: 3/3] util: Place spawned processes into a systemd scope
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/benzea/systemd-scopes: 3/3] util: Place spawned processes into a systemd scope
- Date: Wed, 27 Nov 2019 15:43:37 +0000 (UTC)
commit 9282f6936e64d0d473830506c22d6266790d8711
Author: Benjamin Berg <bberg redhat com>
Date: Wed Nov 27 16:35:45 2019 +0100
util: Place spawned processes into a systemd scope
This improves the separation from the shell for applications launched
with Alt+F2 and in a few other cases.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/863
js/misc/util.js | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/js/misc/util.js b/js/misc/util.js
index b2c46a79a0..dd1049d769 100644
--- a/js/misc/util.js
+++ b/js/misc/util.js
@@ -126,6 +126,14 @@ function trySpawn(argv) {
throw err;
}
}
+
+ try {
+ // This will do nothing on a non-systemd session
+ Shell.util_start_systemd_scope(argv[0], pid);
+ } catch (err) {
+ logError(err);
+ }
+
// Dummy child watch; we don't want to double-fork internally
// because then we lose the parent-child relationship, which
// can break polkit. See https://bugzilla.redhat.com//show_bug.cgi?id=819275
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]