diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-12 21:06:50 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-12 21:06:50 +0000 |
| commit | 329f2a488c6b9f3b9b8e9ff940c58d8564ae9f5f (patch) | |
| tree | d3901977fc78bd84f3b58c5afe17a08b52102c4a /terminal.c | |
| parent | client: repair usage output (diff) | |
term: don’t close PTY when client application dies
Closing it as soon as we detect that the client has died, means we may
not have drained it completely.
The PTY is either closed _by_ the client application, or by us when we
shutdown the terminal. Thus, leaving it open (until we call
term_shutdown()) is fine.
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -991,16 +991,8 @@ slave_died(struct reaper *reaper, pid_t pid, int status, void *data) term->slave_has_been_reaped = true; term->exit_status = status; - if (term->conf->hold_at_exit) { - /* The PTMX FDM handler may already have closed our end */ - if (term->ptmx >= 0) { - fdm_del(term->fdm, term->ptmx); - term->ptmx = -1; - } - return; - } - - term_shutdown(term); + if (!term->conf->hold_at_exit) + term_shutdown(term); } struct terminal * |
