Release murx 1.0.5 with session adoption fixes
Preserve status-bar window order and close adopted panes when their shells exit. Update release notes and package versions, and refresh Alpine and Arch source checksums.
This commit is contained in:
parent
b74b1f0664
commit
7b0d394685
8 changed files with 98 additions and 31 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
# murx 1.0.5 released
|
||||||
|
|
||||||
|
**November 26, 2026**
|
||||||
|
|
||||||
|
- Preserve window order in the status bar when adopting a session with
|
||||||
|
`--adopt`.
|
||||||
|
- Close adopted panes when their shells exit, including when Ctrl-D exits
|
||||||
|
a shell.
|
||||||
|
|
||||||
# murx 1.0.4 released
|
# murx 1.0.4 released
|
||||||
|
|
||||||
**November 24, 2026**
|
**November 24, 2026**
|
||||||
|
|
|
||||||
73
murx.c
73
murx.c
|
|
@ -88,7 +88,7 @@
|
||||||
#define MURX_NOIPA
|
#define MURX_NOIPA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MURX_VERSION "1.0.4"
|
#define MURX_VERSION "1.0.5"
|
||||||
#define DEFAULT_PREFIX 0x01
|
#define DEFAULT_PREFIX 0x01
|
||||||
|
|
||||||
/* client -> server */
|
/* client -> server */
|
||||||
|
|
@ -698,6 +698,7 @@ struct Pane {
|
||||||
pid_t reported_root_pgrp;
|
pid_t reported_root_pgrp;
|
||||||
int id;
|
int id;
|
||||||
int tty_fd;
|
int tty_fd;
|
||||||
|
int adopted;
|
||||||
|
|
||||||
Pane *next;
|
Pane *next;
|
||||||
};
|
};
|
||||||
|
|
@ -4683,6 +4684,7 @@ static int rd_pane(HRdBuf *r, Pane *p, int *fds, int nfds, int history_limit) {
|
||||||
p->id = id;
|
p->id = id;
|
||||||
p->fd = fds[master_idx];
|
p->fd = fds[master_idx];
|
||||||
p->tty_fd = fds[tty_idx];
|
p->tty_fd = fds[tty_idx];
|
||||||
|
p->adopted = 1;
|
||||||
if (rd_i32(r, (int32_t *)&p->pid) < 0 || rd_i32(r, &p->alive) < 0) return -1;
|
if (rd_i32(r, (int32_t *)&p->pid) < 0 || rd_i32(r, &p->alive) < 0) return -1;
|
||||||
if (rd_i32(r, &p->x) < 0 || rd_i32(r, &p->y) < 0 ||
|
if (rd_i32(r, &p->x) < 0 || rd_i32(r, &p->y) < 0 ||
|
||||||
rd_i32(r, &p->w) < 0 || rd_i32(r, &p->h) < 0) return -1;
|
rd_i32(r, &p->w) < 0 || rd_i32(r, &p->h) < 0) return -1;
|
||||||
|
|
@ -4940,6 +4942,7 @@ static Session *session_deserialize(HRdBuf *r, int *fds, int nfds) {
|
||||||
|
|
||||||
uint32_t nwin;
|
uint32_t nwin;
|
||||||
if (rd_u32(r, &nwin) < 0 || nwin > 512) goto fail_panes;
|
if (rd_u32(r, &nwin) < 0 || nwin > 512) goto fail_panes;
|
||||||
|
Window **window_tail = &s->windows;
|
||||||
for (uint32_t i = 0; i < nwin; i++) {
|
for (uint32_t i = 0; i < nwin; i++) {
|
||||||
Window *w = xcalloc(1, sizeof *w);
|
Window *w = xcalloc(1, sizeof *w);
|
||||||
int32_t active_id;
|
int32_t active_id;
|
||||||
|
|
@ -4949,27 +4952,16 @@ static Session *session_deserialize(HRdBuf *r, int *fds, int nfds) {
|
||||||
w->root = rd_layout(r, panes, (int)npane);
|
w->root = rd_layout(r, panes, (int)npane);
|
||||||
if (!w->root) { free(w); goto fail_panes; }
|
if (!w->root) { free(w); goto fail_panes; }
|
||||||
w->active = find_pane_id(panes, (int)npane, active_id);
|
w->active = find_pane_id(panes, (int)npane, active_id);
|
||||||
w->next = s->windows;
|
*window_tail = w;
|
||||||
s->windows = w;
|
window_tail = &w->next;
|
||||||
}
|
}
|
||||||
/* Rebuild in serialization order. */
|
|
||||||
Window **order = xcalloc(nwin ? nwin : 1, sizeof *order);
|
|
||||||
uint32_t n = 0;
|
|
||||||
for (Window *w = s->windows; w; w = w->next) order[n++] = w;
|
|
||||||
s->windows = NULL;
|
|
||||||
for (uint32_t i = n; i > 0; i--) {
|
|
||||||
order[i - 1]->next = s->windows;
|
|
||||||
s->windows = order[i - 1];
|
|
||||||
}
|
|
||||||
free(order);
|
|
||||||
s->nwin = (int)nwin;
|
s->nwin = (int)nwin;
|
||||||
int32_t cur_idx, last_idx;
|
int32_t cur_idx, last_idx;
|
||||||
if (rd_i32(r, &cur_idx) < 0 || rd_i32(r, &last_idx) < 0) goto fail_panes;
|
if (rd_i32(r, &cur_idx) < 0 || rd_i32(r, &last_idx) < 0) goto fail_panes;
|
||||||
for (int i = 0; i < (int)nwin; i++) {
|
int wi = 0;
|
||||||
Window *w = s->windows;
|
for (Window *w = s->windows; w; w = w->next, wi++) {
|
||||||
for (int k = 0; k < i; k++) w = w->next;
|
if (wi == cur_idx) s->cur = w;
|
||||||
if (i == cur_idx) s->cur = w;
|
if (wi == last_idx) s->last = w;
|
||||||
if (i == last_idx) s->last = w;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nclient;
|
uint32_t nclient;
|
||||||
|
|
@ -5204,11 +5196,32 @@ static void server_notify_all(Session *s, const char *msg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Adopted shells are no longer children of the server. */
|
||||||
|
static int adopted_shell_exited(pid_t pid) {
|
||||||
|
if (kill(pid, 0) < 0 && errno == ESRCH) return 1;
|
||||||
|
#ifdef __linux__
|
||||||
|
/* A shell can remain a zombie until its new parent reaps it. */
|
||||||
|
char path[64], line[256];
|
||||||
|
snprintf(path, sizeof path, "/proc/%ld/status", (long)pid);
|
||||||
|
FILE *f = fopen(path, "r");
|
||||||
|
if (!f) return 0;
|
||||||
|
char state = '\0';
|
||||||
|
while (fgets(line, sizeof line, f)) {
|
||||||
|
if (sscanf(line, "State: %c", &state) == 1) break;
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
|
return state == 'Z' || state == 'X';
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void run_server(Session *s) {
|
static void run_server(Session *s) {
|
||||||
int maxpanes = count_add(session_pane_count(s), 64);
|
int maxpanes = count_add(session_pane_count(s), 64);
|
||||||
Pane **panes = xcalloc((size_t)maxpanes, sizeof(Pane *));
|
Pane **panes = xcalloc((size_t)maxpanes, sizeof(Pane *));
|
||||||
unsigned char rbuf[65536];
|
unsigned char rbuf[65536];
|
||||||
int dirty = 1;
|
int dirty = 1;
|
||||||
|
long long next_adopted_check = 0;
|
||||||
|
|
||||||
while (s->running && !g_term) {
|
while (s->running && !g_term) {
|
||||||
int need = session_pane_count(s);
|
int need = session_pane_count(s);
|
||||||
|
|
@ -5229,16 +5242,26 @@ static void run_server(Session *s) {
|
||||||
Pane *p = panes[i];
|
Pane *p = panes[i];
|
||||||
if (p->pid != r) continue;
|
if (p->pid != r) continue;
|
||||||
p->pid = -1;
|
p->pid = -1;
|
||||||
for (;;) {
|
|
||||||
ssize_t n = read(p->fd, rbuf, sizeof rbuf);
|
|
||||||
if (n > 0) em_feed(p, rbuf, (size_t)n);
|
|
||||||
else break;
|
|
||||||
}
|
|
||||||
p->alive = 0;
|
|
||||||
reaped = 1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
long long now = now_ms();
|
||||||
|
int check_adopted = now >= next_adopted_check;
|
||||||
|
if (check_adopted) next_adopted_check = now + 200;
|
||||||
|
for (int i = 0; i < np; i++) {
|
||||||
|
Pane *p = panes[i];
|
||||||
|
if (check_adopted && p->adopted && p->pid > 0 &&
|
||||||
|
adopted_shell_exited(p->pid))
|
||||||
|
p->pid = -1;
|
||||||
|
if (p->pid != -1) continue;
|
||||||
|
for (;;) {
|
||||||
|
ssize_t n = read(p->fd, rbuf, sizeof rbuf);
|
||||||
|
if (n > 0) em_feed(p, rbuf, (size_t)n);
|
||||||
|
else if (n >= 0 || errno != EINTR) break;
|
||||||
|
}
|
||||||
|
p->alive = 0;
|
||||||
|
reaped = 1;
|
||||||
|
}
|
||||||
if (reaped) {
|
if (reaped) {
|
||||||
for (int i = 0; i < np; i++) {
|
for (int i = 0; i < np; i++) {
|
||||||
if (!panes[i]->alive) remove_pane_ptr(s, panes[i]);
|
if (!panes[i]->alive) remove_pane_ptr(s, panes[i]);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Local source snapshot; refresh version and checksums with `make pkgsums`.
|
# Local source snapshot; refresh version and checksums with `make pkgsums`.
|
||||||
pkgname=murx
|
pkgname=murx
|
||||||
pkgver=1.0.4
|
pkgver=1.0.5
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="Small persistent terminal multiplexer"
|
pkgdesc="Small persistent terminal multiplexer"
|
||||||
url="https://codeberg.org/armin/murx"
|
url="https://codeberg.org/armin/murx"
|
||||||
|
|
@ -26,7 +26,7 @@ package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
fb4a217160f7816b03adb76272a6c477d106d4b5d91a404f3041b579910c233df9fcb84dbef358219e1b9df783a59729458c9418b0277e257661a9d5a5bb7300 murx.c
|
178d1cbabfcc2c190662155bb2d8066fc7d9bf87526f5afe5f639b22dccb9d7942cde0be9199f23da0eed49c61b22a64cc97845dd58aa4e253ec389c538df843 murx.c
|
||||||
ac75bfe596fae665ba882a10f5d16551bdd02cd601b786364763ac74dbc651c386d3a464eb63e0344354b953611629135190633e3b8ff3a8ef0f0849d60a3f7b Makefile
|
ac75bfe596fae665ba882a10f5d16551bdd02cd601b786364763ac74dbc651c386d3a464eb63e0344354b953611629135190633e3b8ff3a8ef0f0849d60a3f7b Makefile
|
||||||
16a542970423f761175da657bc54d37c089197cc3428397c2de51a312280c751b03af70ce38cf5b3fea9e0b2ed006d5b892e54ddbc625806e05e41a726b18225 murx.1
|
16a542970423f761175da657bc54d37c089197cc3428397c2de51a312280c751b03af70ce38cf5b3fea9e0b2ed006d5b892e54ddbc625806e05e41a726b18225 murx.1
|
||||||
1ce08e99e30b85347bf8f228525440887e083f9cc2175f951693fa2dad9357870fa587ffc1ee98a60edad957468f2b8b8af96ac3bf6ddd38df13deceb429f381 MURX-README.md
|
1ce08e99e30b85347bf8f228525440887e083f9cc2175f951693fa2dad9357870fa587ffc1ee98a60edad957468f2b8b8af96ac3bf6ddd38df13deceb429f381 MURX-README.md
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Local source snapshot; refresh version and checksums with `make pkgsums`.
|
# Local source snapshot; refresh version and checksums with `make pkgsums`.
|
||||||
pkgname=murx
|
pkgname=murx
|
||||||
pkgver=1.0.4
|
pkgver=1.0.5
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Small persistent terminal multiplexer'
|
pkgdesc='Small persistent terminal multiplexer'
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|
@ -8,7 +8,7 @@ url='https://codeberg.org/armin/murx'
|
||||||
license=('Apache-2.0')
|
license=('Apache-2.0')
|
||||||
depends=('glibc')
|
depends=('glibc')
|
||||||
source=('murx.c' 'Makefile' 'murx.1' 'MURX-README.md' 'LICENSE' 'AUTHORS')
|
source=('murx.c' 'Makefile' 'murx.1' 'MURX-README.md' 'LICENSE' 'AUTHORS')
|
||||||
sha256sums=('ab974ac7c5aab39c60d8b1c4e13974bd25d4cee3a228a821dc4f83cafc0d2e0d'
|
sha256sums=('ba98b27e5c620f47a8e0db3408da1a035e9c494ee4a96b58fcd850752d37e49d'
|
||||||
'78a9c19c212e8038422e1bb4bb96d9b25eb19ad1359489cd32edf9e1a76638b2'
|
'78a9c19c212e8038422e1bb4bb96d9b25eb19ad1359489cd32edf9e1a76638b2'
|
||||||
'00496e2c82881dfc10e70d64ebcfde94f25bd3227c1481fa29ce564c81b55c2d'
|
'00496e2c82881dfc10e70d64ebcfde94f25bd3227c1481fa29ce564c81b55c2d'
|
||||||
'615dffa59389202bf7efb1e2a0b672e1e6b1801e1289f4f68728c9dfe98d4ea2'
|
'615dffa59389202bf7efb1e2a0b672e1e6b1801e1289f4f68728c9dfe98d4ea2'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
murx (1.0.5-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Update to upstream version 1.0.5.
|
||||||
|
|
||||||
|
-- Johannes Findeisen <you@hanez.org> Thu, 26 Nov 2026 19:19:14 +0100
|
||||||
|
|
||||||
murx (1.0.4-1) unstable; urgency=medium
|
murx (1.0.4-1) unstable; urgency=medium
|
||||||
|
|
||||||
* Update to upstream version 1.0.4.
|
* Update to upstream version 1.0.4.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
PORTNAME= murx
|
PORTNAME= murx
|
||||||
DISTVERSION= 1.0.4
|
DISTVERSION= 1.0.5
|
||||||
CATEGORIES= sysutils
|
CATEGORIES= sysutils
|
||||||
MASTER_SITES= https://xw3.org/murx/murx/archive/
|
MASTER_SITES= https://xw3.org/murx/murx/archive/
|
||||||
|
|
||||||
|
|
|
||||||
29
os/gentoo/app-misc/murx/murx-1.0.5.ebuild
Normal file
29
os/gentoo/app-misc/murx/murx-1.0.5.ebuild
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="Small persistent terminal multiplexer"
|
||||||
|
HOMEPAGE="https://xw3.org/murx/murx"
|
||||||
|
SRC_URI="https://xw3.org/murx/murx/archive/${P}.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/${PN}"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
|
DOCS=( README.md AUTHORS RELEASES.md )
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
tc-export CC
|
||||||
|
emake
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
./murx --help >/dev/null || die "murx --help failed"
|
||||||
|
[[ $(./murx --version) == "${PN} ${PV}" ]] || die "Unexpected murx version"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake DESTDIR="${D}" PREFIX=/usr install
|
||||||
|
einstalldocs
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
COMMENT = small persistent terminal multiplexer
|
COMMENT = small persistent terminal multiplexer
|
||||||
|
|
||||||
DISTNAME = murx-1.0.4
|
DISTNAME = murx-1.0.5
|
||||||
CATEGORIES = sysutils
|
CATEGORIES = sysutils
|
||||||
HOMEPAGE = https://codeberg.org/armin/murx
|
HOMEPAGE = https://codeberg.org/armin/murx
|
||||||
MAINTAINER = Johannes Findeisen <you@hanez.org>
|
MAINTAINER = Johannes Findeisen <you@hanez.org>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue