diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-10-30 19:25:45 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-10-30 19:25:45 +0000 |
| commit | 644585a3e5e2ca678a7ad6ce74c8629196ae7d62 (patch) | |
| tree | 109733b5111c531fab3037fa8c1000ba4c604b65 | |
| parent | wayland: temporary: track last terminal's exit value (diff) | |
term: term_shutdown(): set exit value in wayland
| -rw-r--r-- | terminal.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -529,6 +529,7 @@ fdm_shutdown(struct fdm *fdm, int fd, int events, void *data) { LOG_DBG("FDM shutdown"); struct terminal *term = data; + struct wayland *wayl = term->wl; fdm_del(term->fdm, fd); close(fd); @@ -538,17 +539,18 @@ fdm_shutdown(struct fdm *fdm, int fd, int events, void *data) * trigger, meaning it should be safe to destroy the terminal. */ - assert(term->wl->focused != term); - assert(term->wl->moused != term); + assert(wayl->focused != term); + assert(wayl->moused != term); - tll_foreach(term->wl->terms, it) { + tll_foreach(wayl->terms, it) { if (it->item == term) { - tll_remove(term->wl->terms, it); + tll_remove(wayl->terms, it); break; } } - term_destroy(term); + wayl->last_exit_value = term_destroy(term); + LOG_WARN("last-exit-value: %d", wayl->last_exit_value); return true; } |
