Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [andrew@xxxxxxxxxxx: Bug#303623: zsh: CHECK_JOBS doesn't work when only one command was run since last Control-D]



On Apr 7,  3:10pm, Clint Adams wrote:
}
} When a job is still running and the CHECK_JOBS is set, zsh should only
} exit when it receives two exit requests in a row.  However, sometimes it
} honors an exit request in other conditions.  One repeatable case is when
} the request is a Control-D and there was only one command run since the
} last exit request.

The issue here seems to be that zsh doesn't actually receive a ctrl-D
keystroke, but rather that there is a true end-of-file on the tty.
If you try, for example, running zsh and then starting another zsh from
within the first, then when you force the "inner" zsh to exit, the "outer"
one sometimes exits as well.

There may actually be some kind of race condition here, because sometimes
only the "inner" shell exits.  It might even be an xterm bug.

Here's a much simpler example to reproduce the base problem:

zsh -f
% sleep 300 &
% <C-d>
zsh: you have running jobs.
% true
% <C-d>
zsh: warning: 1 jobs SIGHUPed

It only happens with <C-d>, not with the 'exit' builtin, so it may have
to do with an interaction with no_ignore_eof.



Messages sorted by: Reverse Date, Date, Thread, Author