term: don't register ptmx with FDM if we're shutting down

This can happen when there's an error instantiating the
terminal *after* we've spawned the slave process.
This commit is contained in:
Daniel Eklöf 2020-05-04 20:49:28 +02:00
parent 9864d91975
commit 56d53ec2a1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -957,8 +957,10 @@ void
term_window_configured(struct terminal *term)
{
/* Enable ptmx FDM callback */
assert(term->window->is_configured);
fdm_add(term->fdm, term->ptmx, EPOLLIN, &fdm_ptmx, term);
if (!term->is_shutting_down) {
assert(term->window->is_configured);
fdm_add(term->fdm, term->ptmx, EPOLLIN, &fdm_ptmx, term);
}
}
static bool