smoosh icon indicating copy to clipboard operation
smoosh copied to clipboard

Buggy job control

Open mgree opened this issue 5 years ago • 3 comments

There are some bugs in interactive job control.

  • [x] https://github.com/mgree/smoosh/commit/ab3aa4d5320f59ec06a5c1045e42ddd57e3a2f09#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 on SIGCHLD

mgree avatar Jun 12 '19 13:06 mgree

  • [ ] 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).

mgree avatar Jun 12 '19 13:06 mgree

  • [x] echo hi | sleep 3, ^Z, fg doesn't work. Some bugs fixed in 7a75e15 (wasn't properly simulating killpg), but we're not all the way there yet.

mgree avatar Jun 13 '19 01:06 mgree

  • [ ] smoosh -c 'echo | smoosh -i' is blocking on taking the foreground. everything else seems to be okay in 3fc4dd4

mgree avatar Jun 13 '19 18:06 mgree