weston/compositor
Derek Foreman bb1d19dc5e compositor: Launch clients in their own session
When we launch clients they currently stay in the same session as
weston, and share its controlling terminal. This means hitting ctrl-c
in weston's controlling terminal will send SIGINT to the clients as
well. It also means SIGHUP will be propagated to our launched clients
if weston's controlling terminal is closed.

While generally not harmful, this behaviour is not beneficial, and
is present by default and not by design.

Problems arise when launching weston in a debugger, as a ctrl-c sent to
the debugger will be propagated not only to the debugger, but all the child
processes sharing weston's session. This results in weston-desktop-shell
being killed by the ctrl-c that was intended to stop weston for debugging.

If weston-desktop-shell is killed within 30 second of startup, it will
result weston performing a clean shutdown. This clean shutdown can
make debugging a little too surprising.

Ostensibly, clients launched via weston_client_launch will be wayland
clients that terminate cleanly on their own if weston is killed, so
there should be no need for them to remain in weston's session to
catch ctrl-c from its controlling terminal. Nor should they need a
controlling terminal for their general operation.

Use setsid() to move them to their own session, devoid of controlling
terminal, to make using a debugger a little less confusing in some
cases.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2022-04-13 08:56:48 +00:00
..
cms-colord.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
cms-helper.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
cms-helper.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
cms-static.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
executable.c tests: add mechanism to change Weston's behavior when running certain tests 2020-10-27 11:21:55 +00:00
main.c compositor: Launch clients in their own session 2022-04-13 08:56:48 +00:00
meson.build compositor: Add suggestion when colord is enabled but not LCMS 2021-02-12 12:13:28 +00:00
screen-share.c screen-share: Name the seat "screen-share" 2022-02-08 09:41:24 +02:00
systemd-notify.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
text-backend.c Fix crash on activating a text area without a real keyboard 2021-11-18 11:29:56 +02:00
weston-screenshooter.c screenshooter: rename some functions to avoid conflicts 2020-10-27 12:19:39 +00:00
weston.desktop Remove dbus-launch from weston.desktop 2017-01-18 12:21:57 +00:00
weston.h compositor: Move child_process_list from global to wet_compositor. 2021-07-06 18:46:09 +00:00
xwayland.c xwayland: Simplify HAVE_XWAYLAND_LISTENFD usage 2022-04-11 08:45:19 +03:00