mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-22 19:24:27 +00:00
9229a45116
Recently I learnt that fprintf() is not async-signal-safe. Maybe it also attempts to allocate memory sometimes. Hence, using it when we presumably are out of memory is wishful thinking. Therefore replace that with async-signal-safe code. If you have to check pointers from traditional signal handlers, now you could do that too! While doing this, we also lose the string formatting for line number. I would argue that printing file and line number is not that useful, if the system really is out of memory. If not out of memory, a core dump would give us much more detailed information about what went wrong. clients/window.c had some calls to fail_on_null() and these are simply replaced. They were used for checking that creating new wl_proxy by issuing a protocol request worked, and IIRC that only fails on out-of-memory, so the same rationale applies here. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> |
||
---|---|---|
.. | ||
cairo-util.c | ||
cairo-util.h | ||
config-parser.c | ||
fd-util.h | ||
file-util.c | ||
file-util.h | ||
frame.c | ||
helpers.h | ||
image-loader.c | ||
image-loader.h | ||
matrix.c | ||
meson.build | ||
option-parser.c | ||
os-compatibility.c | ||
os-compatibility.h | ||
platform.h | ||
process-util.c | ||
process-util.h | ||
signal.c | ||
signal.h | ||
string-helpers.h | ||
timespec-util.h | ||
weston-drm-fourcc.h | ||
weston-egl-ext.h | ||
xalloc.h | ||
xcb-xwayland.c | ||
xcb-xwayland.h |