1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-24 06:54:13 +00:00
cde/src/cmd/ksh93/sh
Martijn Dekker 9d428f8f5e Fix erroneous fork after 'readonly PATH' in subshell (re: 102868f8)
After making PATH readonly in a virtual subshell (without otherwise
changing it, so the subshell is never forked), then the main shell
would erroneously fork into a background process immediately after
leaving the virtual subshell. This was caused by a bug in the
forking workaround that prevents changes in PATH in a virtual
subshell from clearing the parent shell's hash table.

src/cmd/ksh93/sh/name.c: nv_putval():
- If we're either setting or restoring PATH, do an additional check
  for the NV_RDONLY flag, which means the function was told to
  ignore the variable's readonly state. It is told to ignore that
  when restoring the parent shell state after exiting a virtual
  subshell. If we don't fork then, we don't fork the parent shell.

src/cmd/ksh93/tests/subshell.sh:
- Add regression test verifying that no forking happens when making
  PATH readonly in a subshell.

Fixes #30.
2020-06-20 23:47:42 +02:00
..
args.c Fix set +r so that it cannot unset the restricted option 2020-06-12 01:45:18 +02:00
arith.c silence macro redefinition warnings (re: 7003aba4) 2020-06-16 04:51:21 +02:00
array.c Fix 80 typos in comments 2020-06-12 01:45:12 +02:00
bash.c Fix 47 typos in user-facing help and error messages 2020-06-12 01:45:12 +02:00
defs.c Fix 'test'/'[' exit status >1 on error in arithmetic expression 2020-06-12 01:45:15 +02:00
deparse.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
env.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
expand.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
fault.c Fix signal handling due to exit status > 256 2020-06-12 01:45:17 +02:00
fcin.c Fix parsing of multibyte characters 2020-06-12 01:45:17 +02:00
init.c Fix unreliable behavior when special vars are readonly or unset (#27) 2020-06-20 18:08:41 +01:00
io.c Remove code related to long-dead 3DFS research project 2020-06-12 01:45:17 +02:00
jobs.c Implement a portable fix for SIGCHLD crashes (#18) 2020-06-16 22:44:02 +01:00
lex.c Fix BUG_REDIRIO 2020-06-12 01:45:13 +02:00
macro.c POSIX compliance fix: apply 'set -u' to $! 2020-06-12 01:45:17 +02:00
main.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
name.c Fix erroneous fork after 'readonly PATH' in subshell (re: 102868f8) 2020-06-20 23:47:42 +02:00
nvdisc.c Restore #22 'unset -f' fix minus segfault (re: b7932e87, 97511748) 2020-06-18 02:48:51 +02:00
nvtree.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
nvtype.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
parse.c Make 'source' a regular built-in 2020-06-15 11:33:44 +02:00
path.c Fix 'whence -a' to print correct path for tracked alias (#25) 2020-06-19 14:03:58 +02:00
pmain.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
shcomp.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
streval.c silence macro redefinition warnings (re: 7003aba4) 2020-06-16 04:51:21 +02:00
string.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
subshell.c Fix unreliable behavior when special vars are readonly or unset (#27) 2020-06-20 18:08:41 +01:00
suid_exec.c Fix 39 spelling errors and a formatting issue 2020-06-12 01:45:18 +02:00
tdump.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
timers.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
trestore.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
waitevent.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
xec.c Restore #22 'unset -f' fix minus segfault (re: b7932e87, 97511748) 2020-06-18 02:48:51 +02:00