Buggy job control
mgree opened this issue · 3 comments
mgree commented
There are some bugs in interactive job control.
- ab3aa4d#diff-597a09bc85e5022f70eb206c759b4b85 was accidentlly using job control in pipes, breaking, e.g.,
hostname | wc -l
- need to be careful update current job statuses on
ECHLD
-
Sh_notify
should trigger ASAP onSIGCHLD
mgree commented
- Break from loops, etc., when a command exits due to SIGINT (status 130) (cf. dash)
-
INTON
/INTOFF
à la dash to get correct command editing behavior
If sh receives a SIGINT signal in command mode (whether generated
by typing the interrupt character or by other means), it shall
terminate command line editing on the current command line,
reissue the prompt on the next line of the terminal, and reset the
command history (see fc) so that the most recently executed
command is the previous command (that is, the command that was
being edited when it was interrupted is not re-entered into the
history).