mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
Merge branch 'drain-pty-when-client-terminates'
This commit is contained in:
commit
4fca142f71
2 changed files with 3 additions and 10 deletions
|
|
@ -108,6 +108,7 @@
|
||||||
exiting shell (https://codeberg.org/dnkl/foot/issues/366).
|
exiting shell (https://codeberg.org/dnkl/foot/issues/366).
|
||||||
* Default value of `-t,--term` in `--help` output when foot was built
|
* Default value of `-t,--term` in `--help` output when foot was built
|
||||||
without terminfo support.
|
without terminfo support.
|
||||||
|
* Drain PTY when the client application terminates.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
12
terminal.c
12
terminal.c
|
|
@ -991,16 +991,8 @@ slave_died(struct reaper *reaper, pid_t pid, int status, void *data)
|
||||||
term->slave_has_been_reaped = true;
|
term->slave_has_been_reaped = true;
|
||||||
term->exit_status = status;
|
term->exit_status = status;
|
||||||
|
|
||||||
if (term->conf->hold_at_exit) {
|
if (!term->conf->hold_at_exit)
|
||||||
/* The PTMX FDM handler may already have closed our end */
|
term_shutdown(term);
|
||||||
if (term->ptmx >= 0) {
|
|
||||||
fdm_del(term->fdm, term->ptmx);
|
|
||||||
term->ptmx = -1;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
term_shutdown(term);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct terminal *
|
struct terminal *
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue