Introduction
Introduction Statistics Contact Development Disclaimer Help
ptty: explicit wait for child - scroll - scrollbackbuffer program for st
git clone git://git.suckless.org/scroll
Log
Files
Refs
README
LICENSE
---
commit d10c029b182fef1af4c6ec2713f9a8a3a5245edb
parent ea938bbb0415e745bc969e4bf4123a41723e740f
Author: Jan Klemkow <[email protected]>
Date: Thu, 16 Apr 2020 23:19:21 +0200
ptty: explicit wait for child
Diffstat:
M ptty.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/ptty.c b/ptty.c
@@ -138,11 +138,9 @@ main(int argc, char *argv[])
break;
}
- pid_t pid;
int status;
- while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
- if (pid != child)
- continue;
+ if (waitpid(child, &status, 0) != child)
+ die("waitpid:");
return WEXITSTATUS(status);
}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.