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 <stefan@agner.ch>
dev
Stefan Agner 5 years ago
parent f68ee07880
commit a8b4ddaec2
  1. 8
      libweston/weston-launch.c

@ -510,7 +510,13 @@ handle_signal(struct weston_launch *wl)
break; break;
case SIGTERM: case SIGTERM:
case SIGINT: case SIGINT:
if (wl->child) 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); kill(wl->child, sig.ssi_signo);
break; break;
case SIGUSR1: case SIGUSR1:

Loading…
Cancel
Save