ruderich.org/simon
/
ptyas
/
ptyas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
558cfda
)
Specify arguments of sigchld_handler()
author
Simon Ruderich
<simon@ruderich.org>
Sun, 4 Nov 2018 07:21:57 +0000
(08:21 +0100)
committer
Simon Ruderich
<simon@ruderich.org>
Sun, 4 Nov 2018 07:21:57 +0000
(08:21 +0100)
ptyas.c
patch
|
blob
|
history
diff --git
a/ptyas.c
b/ptyas.c
index 4b7b208856e88f53a43abc833ea4dde6a7c5bcdb..9fc7997269a23b756f8a173f399f8bbad771df26 100644
(file)
--- 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. */