From dad601b98c99c7597d7d6e1df85028d884051a90 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 4 Nov 2018 08:21:57 +0100 Subject: [PATCH] Specify arguments of sigchld_handler() --- ptyas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ptyas.c b/ptyas.c index 4b7b208..9fc7997 100644 --- a/ptyas.c +++ b/ptyas.c @@ -270,10 +270,12 @@ static void proxy_input_between_ttys(int pty_master, int ctty, volatile pid_t *p static volatile pid_t pid_to_wait_for; static int pid_to_wait_for_status; -static void sigchld_handler() { +static void sigchld_handler(int signal) { int status; pid_t pid; + (void)signal; + while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { if (pid == pid_to_wait_for) { /* Mark that our child has died and we should exit as well. */ -- 2.43.2