You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nushell shouldn't do anything job control-y when not in interactive mode #9026
Even when nushell is started in non-interactive mode (i.e. nu -c command), it still does job control stuff (e.g. blocking SIGTSTP, set tty foreground process group, etc.).
Most shells (e.g. bash, zsh, dash) will disable job control when not in interactive mode, unless explicitly turned on by options. nushell should do this same.
How to reproduce
nu -c command
Expected behavior
nu doesn't block TSTP, and doesn't create new process groups.
so if I run nu in non-interactive mode, job control would be the responsibility of whatever I ran nu from. If I ran nu -c nvim from an interactive nushell instance, then it will inherit the blocked signals and I won't be able to suspend it anyway. If I ran nu -c nvim from a zsh instance, then I will be able to un-suspend it by running fg in zsh.
@fdncred I think this should still be open. Although #9693 fixes nushell setting the foreground process group, it doesn't fix anything regarding signals.
Activity
yshui commentedon Apr 28, 2023
as a more concrete example, the expected result of pressing Ctrl-Z while running
nu -c nvim, isnubeing suspended along withnvim.amtoine commentedon Apr 28, 2023
how would you un-suspend
nvimandnuafter pressing<C-z>?i'm not sure i see the use case of this, not super familiar with SIG control signals 😋
yshui commentedon Apr 28, 2023
so if I run
nuin non-interactive mode, job control would be the responsibility of whatever I rannufrom. If I rannu -c nvimfrom an interactive nushell instance, then it will inherit the blocked signals and I won't be able to suspend it anyway. If I rannu -c nvimfrom azshinstance, then I will be able to un-suspend it by runningfgin zsh.Do not attempt to take control of terminal in non-interactive mode (#…
IanManske commentedon Jul 17, 2023
@fdncred I think this should still be open. Although #9693 fixes nushell setting the foreground process group, it doesn't fix anything regarding signals.
Do not block signals for child processes (#11402)
Do not block signals for child processes (nushell#11402)