diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-05-04 18:49:28 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-05-04 18:49:28 +0000 |
| commit | 56d53ec2a1874455bfb26fc1c9dc2b23a30b91aa (patch) | |
| tree | 7a5a7bf930543be18c4fbe2bdec6d9ff58759032 | |
| parent | term: set 'is_shutting_down' before calling term_destroy() on error (diff) | |
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.
| -rw-r--r-- | terminal.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |
