Skip to content

Detect native POSIX child exit independently of PTY hangup - #779

Merged
emil-e merged 1 commit into
dakra:mainfrom
emil-e:fix/776-native-child-exit
Nov 1, 2026
Merged

emil-e merged 1 commit into
dakra:mainfrom
emil-e:fix/776-native-child-exit

Conversation

@emil-e

@emil-e emil-e commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Watch child exit with a blocking waitpid waiter thread and wake the existing reader pipe, rather than waiting for PTY hangup while background jobs keep the replica open.
  • Drain queued output on child exit and join the waiter before releasing its state and wake pipe.
  • Add regression coverage for background jobs, final output and exit status, and PTY closure before child exit.

Fixes #776.

Verification

  • macOS build, 40 Zig tests, and 34 relevant native integration tests passed.
  • Elisp byte-compilation and checkdoc passed.
  • Linux (aarch64-linux-gnu) and FreeBSD (x86_64-freebsd) cross-builds passed.
  • Linux runtime verification has not been performed.

@emil-e
emil-e merged commit b7c5268 into dakra:main Nov 1, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ghostel doesn't exit on C-d when background jobs are running

1 participant