Skip to content

resuming vi/emacs after CTRL-Z doesn't work #12929

Description

@0-wiz-0

I'm considering switching to fish on NetBSD 11.99.7/x86_64. I've tried this in 4.7.1, then updated the package in pkgsrc to 4.8.1, the problem exists in both versions. It happens both in a wezterm with TERM is set to tmux-direct and a plain xterm with TERM=xterm.

My test case is:
start vi (or emacs)
ctrl-z it (works)
try to fg it again
The last step never works, I always get:

$ vi i
fish: Job 1, 'vi i' has stopped
$ fg
Send job 1 (vi i) to foreground
fish: Job 1, 'vi i' has stopped

or

$ fg
Send job 1 (vi i) to foreground
fish: Job 1, 'vi i' has stopped
~                              ⏎                                                                                                                                                                               

Activity

  1. 0-wiz-0 commented on Aug 10, 2026

    @0-wiz-0
    ContributorAuthor

    When I kill the vi, I have to type fg three or four more times until it's really dead:

    $ fg
    Send job 1 (vi i) to foreground
    fish: Job 1, 'vi i' has stopped
    $ fg
    Send job 1 (vi i) to foreground
    fish: Job 1, 'vi i' has stopped
    fish: Job 1, 'vi i' has stopped
    $ fg
    fg: There are no suitable jobs
    
  2. added this to the fish 4.9 milestone on Sep 1, 2026
  3. krobelus commented on Sep 1, 2026

    @krobelus
    Contributor

    Sorry for the delay I was on vacation. Due to a bug in rust-lang/libc crate, WIFSTOPPED returned true for "continued" notifications.
    Will be released in upcoming fish 4.9 later this month.

    with TERM is set

    FWIW, nowadays fish ignores TERM (with some exceptions like TERM=dumb).

  4. added a commit that references this issue on Sep 1, 2026
    9555bde
  5. added a commit that references this issue on Sep 4, 2026
  6. 0-wiz-0 commented on Sep 15, 2026

    @0-wiz-0
    ContributorAuthor

    Oh, wow, that triggered a bugfix in the libc crate - thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions