[PATCH weston 2/3] desktop-shell: launch clients in their own process group.

Derek Foreman derekf at osg.samsung.com
Fri Mar 24 14:41:13 UTC 2017


Client applications shouldn't be in the same process group as
the display server.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 clients/desktop-shell.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index b133d86e..2667e9bb 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -212,6 +212,10 @@ panel_launcher_activate(struct panel_launcher *widget)
 		return;
 
 	argv = widget->argv.data;
+
+	if (setsid() == -1)
+		exit(EXIT_FAILURE);
+
 	if (execve(argv[0], argv, widget->envp.data) < 0) {
 		fprintf(stderr, "execl '%s' failed: %m\n", argv[0]);
 		exit(1);
-- 
2.11.0



More information about the wayland-devel mailing list