mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-24 15:04:13 +00:00
By definition, subshells are never interactive, so they should disable behaviour associated with interactive shells even if the main shell is interactive. Most visibly, running a background job from a subshell like ( some_command & ) now no longer prints a job ID that you cannot use in the main shell. This behaviour change matches pdksh/mksh, bash, zsh, dash, et al. Prior discussion: https://www.mail-archive.com/austin-group-l@opengroup.org/msg06456.html (plus the preceding thread) src/cmd/ksh93/sh/subshell.c: sh_subshell(): - Before running the command(s) in the subshell using sh_exec(), turn off the SH_INTERACTIVE shell state flag. (No need to add code to restore it as this function already saves and restores the entire shell state.) src/cmd/ksh93/bltins/misc.c: b_bg(): - If there is no job control when using 'bg', 'fg' or 'disown', always print the "no job control" error message and not only if the shell is in the interactive state. This is also what pdksh/mksh, bash and zsh do. |
||
---|---|---|
.. | ||
args.c | ||
arith.c | ||
array.c | ||
defs.c | ||
deparse.c | ||
expand.c | ||
fault.c | ||
fcin.c | ||
init.c | ||
io.c | ||
jobs.c | ||
lex.c | ||
macro.c | ||
main.c | ||
name.c | ||
nvdisc.c | ||
nvtree.c | ||
nvtype.c | ||
parse.c | ||
path.c | ||
pmain.c | ||
shcomp.c | ||
streval.c | ||
string.c | ||
subshell.c | ||
suid_exec.c | ||
tdump.c | ||
timers.c | ||
trestore.c | ||
waitevent.c | ||
xec.c |