weston/compositor
Pekka Paalanen 77cf8cb006 xwayland: do not weston_log() after fork()
Between fork() and exec() in the child process it is only safe to use
async-signal-safe functions. weston_log() definitely is not one, it
allocates memory and does whatnot.

weston_log() is also inappropriate for other reasons: the child process
has its own stream buffers and flight-recorder. No-one looks into the
child process' flight recorder, so messages would be lost there. The
logging machinery might also attempt to write into debug streams,
meaning both parent and child could be writing simultaneously.

It seems that the best we can do is to pre-bake an error message and
only write() it out if exec() fails. There is no mention that even
strerror_r() might be safe to call, so we don't.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-07-12 08:30:22 +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: fix shutdown when xwayland failed to start 2022-07-08 11:56:04 +03:00
meson.build compositor: deprecate cms-static and cms-colord plugins 2022-07-06 10:38:44 +00:00
screen-share.c screen-share: Avoid bit-shifting large values 2022-04-20 19:45:28 +03:00
systemd-notify.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
text-backend.c Defer launch input method with wl_event_loop_add_idle. 2022-04-19 07:06:30 -07:00
weston-private.h compositor: add color_characteristics weston.ini option 2022-05-27 10:30:35 +00:00
weston-screenshooter.c gl-renderer: Add hook to fill weston_buffer for EGL 2022-04-25 14:27:08 +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: do not weston_log() after fork() 2022-07-12 08:30:22 +00:00