weston-launch: use exec to ensure signal delivery
authorStefan Agner <stefan@agner.ch>
Fri, 8 Nov 2019 23:51:29 +0000 (00:51 +0100)
committerStefan Agner <stefan@agner.ch>
Fri, 8 Nov 2019 23:56:06 +0000 (00:56 +0100)
Use exec to make sure the direct child process of weston-launch is
weston. This makes sure that signal delivery (SIGINT/SIGTERM) is
properly forwarded to weston.

Fixes ff3230952a68 ("weston-launch: Run weston in the user login shell")
Signed-off-by: Stefan Agner <stefan@agner.ch>
libweston/weston-launch.c

index 95d6874f530c8338a91b433b63b825326aa60161..8a711b4a91d7a41da8931bb41464287b0578b1e9 100644 (file)
@@ -682,7 +682,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
        child_argv[0] = "/bin/sh";
        child_argv[1] = "-l";
        child_argv[2] = "-c";
-       child_argv[3] = BINDIR "/weston \"$@\"";
+       child_argv[3] = "exec " BINDIR "/weston \"$@\"";
        child_argv[4] = "weston";
        return 5;
 }