From d4b49fb5e911722dbbc6452eb465563276150dc3 Mon Sep 17 00:00:00 2001 From: Chrissie Caulfield Date: Wed, 10 Nov 2021 12:35:07 +0000 Subject: [PATCH] poll: Don't log in a signal handler (#447) qb_log calls malloc() and probably many other non-signal-safe functions, so don't call it in the signal handler. Thanks to Honza for spotting this Signed-off-by: Christine Caulfield --- lib/loop_poll.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/loop_poll.c b/lib/loop_poll.c index be2890f3d..9a0700352 100644 --- a/lib/loop_poll.c +++ b/lib/loop_poll.c @@ -475,12 +475,8 @@ _handle_real_signal_(int signal_num, siginfo_t * si, void *context) res = write(pipe_fds[1], &sig, sizeof(int32_t)); if (res == -1 && errno == EAGAIN) { goto try_again; - } else if (res != sizeof(int32_t)) { - qb_util_log(LOG_ERR, - "failed to write signal to pipe [%d]", res); } } - qb_util_log(LOG_TRACE, "got real signal [%d] sent to pipe", sig); } static void