This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch tymux
in repository terminology.
View the commit online.
commit 8ecad0132e51c791fc8683b7355c5f6b30412d4f
Author: [email protected] <[email protected]>
AuthorDate: Mon May 4 21:33:01 2026 -0600
feat(tymux): broadcast CWD before EXIT in daemon exit callback
When the inner shell exits, the daemon's _pty_exit_cb now broadcasts the
shell's last working directory (via readlink of /proc/<pid>/cwd) to every
connected client before the EXIT message. This pairs with the previous
DETACH→CWD commit to guarantee clients always receive a final CWD just
before their connection terminates, enabling the auto-respawn-at-cwd
feature in native Terminology. The readlink runs safely before process
reap because the exit callback fires on the zombie. On failure, a zero-
length payload is sent (the protocol's "no CWD available" sentinel).
Note: CLI proxy ignores CWD until its enum cap is bumped in a later
commit; the change is backwards-compatible.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---
src/bin/termd_tymux.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/bin/termd_tymux.c b/src/bin/termd_tymux.c
index 612eef11..5c7163a3 100644
--- a/src/bin/termd_tymux.c
+++ b/src/bin/termd_tymux.c
@@ -469,6 +469,19 @@ _pty_exit_cb(void *data)
_tymux_flush_and_notify(sess);
}
+ {
+ char proc_path[64], cwd_buf[PATH_MAX];
+ ssize_t n = -1;
+ if (sess->pty && sess->pty->pid > 0)
+ {
+ snprintf(proc_path, sizeof(proc_path),
+ "/proc/%d/cwd", (int)sess->pty->pid);
+ n = readlink(proc_path, cwd_buf, sizeof(cwd_buf));
+ }
+ if (n < 0) n = 0;
+ EINA_LIST_FOREACH(sess->clients, l, c)
+ termsrv_send_cwd(c->fd, cwd_buf, (uint32_t)n);
+ }
pay.exit_code = (int32_t)sess->pty->exit_code;
EINA_LIST_FOREACH(sess->clients, l, c)
termsrv_msg_send(c->fd, TSRV_MSG_EXIT, &pay, sizeof(pay));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.