When window dies we should wait for child process to die, otherwise there is no one to reap it.
So emove WNOHANG in waitpid(), which may cause screen to not wait for child to die and kill window, leaving zombie process. Bug: 25089 Signed-off-by: Amadeusz Sławiński <am...@asmblr.net> --- src/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index c50952b6..f8e7e11a 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1492,7 +1492,7 @@ int wstat_valid; if (!wstat_valid && p->w_pid > 0) { /* EOF on file descriptor. The process is probably also dead. * try a waitpid */ - if (waitpid(p->w_pid, &wstat, WNOHANG | WUNTRACED) == p->w_pid) { + if (waitpid(p->w_pid, &wstat, WUNTRACED) == p->w_pid) { p->w_pid = 0; wstat_valid = 1; } -- 2.23.0