aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-10-30 19:25:45 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-10-30 19:25:45 +0000
commit644585a3e5e2ca678a7ad6ce74c8629196ae7d62 (patch)
tree109733b5111c531fab3037fa8c1000ba4c604b65
parentwayland: temporary: track last terminal's exit value (diff)
term: term_shutdown(): set exit value in wayland
-rw-r--r--terminal.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/terminal.c b/terminal.c
index 7f3b3023..04c39937 100644
--- a/terminal.c
+++ b/terminal.c
@@ -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;
}