mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
terminal: reaper callback: don’t close ptmx if already closed
This commit is contained in:
parent
8b0ef6aa85
commit
0dbd85ed9e
1 changed files with 5 additions and 2 deletions
|
|
@ -957,8 +957,11 @@ slave_died(struct reaper *reaper, pid_t pid, void *data)
|
|||
LOG_DBG("slave (PID=%u) died", pid);
|
||||
|
||||
if (term->conf->hold_at_exit) {
|
||||
fdm_del(term->fdm, term->ptmx);
|
||||
term->ptmx = -1;
|
||||
/* The PTMX FDM handler may already have closed our end */
|
||||
if (term->ptmx >= 0) {
|
||||
fdm_del(term->fdm, term->ptmx);
|
||||
term->ptmx = -1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue