term: remove client application’s pid from reaper when shutting down

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.
This commit is contained in:
Daniel Eklöf 2021-01-12 09:21:01 +01:00
parent fe12c54d35
commit 6b539ba373
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1334,6 +1334,9 @@ term_shutdown(struct terminal *term)
fdm_del(term->fdm, term->blink.fd);
fdm_del(term->fdm, term->flash.fd);
/* Well 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