desktop-shell: launch clients in their own process group.
Client applications shouldn't be in the same process group as
the display server.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index b133d86..2667e9b 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -212,6 +212,10 @@
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);