From a8b4ddaec28f68831525766b1fcd54be98f8ed8e Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Sat, 9 Nov 2019 00:50:10 +0100 Subject: [PATCH] weston-launch: show when a signal is sent to a child In verbose mode, print when a signal is sent to the child process. Signed-off-by: Stefan Agner --- libweston/weston-launch.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c index 4962bd6f..95d6874f 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -510,8 +510,14 @@ handle_signal(struct weston_launch *wl) break; case SIGTERM: case SIGINT: - if (wl->child) - kill(wl->child, sig.ssi_signo); + if (!wl->child) + break; + + if (wl->verbose) + fprintf(stderr, "weston-launch: sending %s to pid %d\n", + strsignal(sig.ssi_signo), wl->child); + + kill(wl->child, sig.ssi_signo); break; case SIGUSR1: send_reply(wl, WESTON_LAUNCHER_DEACTIVATE);