From 6b539ba37305141e2139a13494e26652a69e3b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 12 Jan 2021 09:21:01 +0100 Subject: [PATCH] =?UTF-8?q?term:=20remove=20client=20application=E2=80=99s?= =?UTF-8?q?=20pid=20from=20reaper=20when=20shutting=20down?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we are shutting down the terminal, we explicitly wait for the child application to terminate (with a timeout, after which the child process is killed). I.e. there’s no need to let the reaper handle it. In fact, doing so leads to a crash since we will have destroyed (and thus free:d) the terminal instance when the reaper callback is called. --- terminal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terminal.c b/terminal.c index 0ea04fc5..c05325ee 100644 --- a/terminal.c +++ b/terminal.c @@ -1334,6 +1334,9 @@ term_shutdown(struct terminal *term) fdm_del(term->fdm, term->blink.fd); fdm_del(term->fdm, term->flash.fd); + /* We’ll deal with this explicitly */ + reaper_del(term->reaper, term->slave); + if (term->window != NULL && term->window->is_configured) fdm_del(term->fdm, term->ptmx); else