Bug 294250 - sysutils/zellij: fix core dump on terminal close
Summary: sysutils/zellij: fix core dump on terminal close
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-04 21:14 UTC by Michael Johnson
Modified: 2026-04-06 21:25 UTC (History)
0 users

See Also:
ashish: maintainer-feedback+


Attachments
zelliji terminal close coredump fix (1.77 KB, patch)
2026-04-04 21:14 UTC, Michael Johnson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Johnson 2026-04-04 21:14:01 UTC
Created attachment 269363 [details]
zelliji terminal close coredump fix

Zellij panics on FreeBSD when the terminal is closed because .unwrap() is called on PTY operations (unset_raw_mode, stdout write/flush) that return EIO when the PTY master is closed.

fix: drop .unwrap() on terminal I/O in the shutdown path.
Comment 1 Michael Johnson 2026-04-04 21:21:57 UTC
To reproduce core dump from pre-patch: 

1. Open a new terminal window
2. Start Zellij
3. Close the terminal window directly
4. Result -- Open another terminal: zellij.core
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-04-06 21:24:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e9587b96326aef905efb2ba64605a44381ca844c

commit e9587b96326aef905efb2ba64605a44381ca844c
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2026-04-06 21:19:52 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2026-04-06 21:21:00 +0000

    sysutils/zellij: Update to 0.44.0

    - Add dependency on SQLite
    - Remove non-applicable patches
    - Add a patch to fix panic on terminal close [0]

    PR:             294250 [0]

    Co-authored-by: Michael Johnson <ahze@ahze.net>

 sysutils/zellij/Makefile                           |   6 +-
 sysutils/zellij/Makefile.crates                    | 308 ++++------
 sysutils/zellij/distinfo                           | 624 ++++++++-------------
 sysutils/zellij/files/patch-Cargo.lock             |  20 +-
 ...-cargo-crates_nix-0.23.1_src_sys_event.rs (new) |  27 +
 ...-cargo-crates_polling-2.2.0_src_kqueue.rs (new) |  26 +
 .../files/patch-zellij-client_src_lib.rs (new)     |  52 ++
 .../files/patch-zellij-server_Cargo.toml (gone)    |  11 -
 .../zellij/files/patch-zellij-utils_Cargo.toml     |   8 +-
 9 files changed, 468 insertions(+), 614 deletions(-)
Comment 3 Ashish SHUKLA freebsd_committer freebsd_triage 2026-04-06 21:25:45 UTC
Hi ahze@

I've applied your patch with modifications while updating port to 0.44.0.

Thanks!