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
Johnothan King 0aa9e03f55
Fix process substitution combined with redirection (#40)
The code for handling process substitution with redirection was
never being run because IORAW is usually set when IOPROCSUB is
set. This commit fixes the problem by moving the required code
out of the !IORAW if statement. The following command now prints
'good' instead of writing 'ok' to a bizzare file:

$ ksh -c 'echo ok > >(sed s/ok/good/); wait'
good

This commit also fixes a bug that caused the process ID of the
asynchronous process to print when the shell was in interactive
mode. The following command no longer prints a process ID,
behaving like in Bash and zsh:

$ echo >(true)
/dev/fd/5

src/cmd/ksh93/sh/args.c:
 - Temporarily turn off the interactive state while in a process
   substitution to prevent the shell from printing the PID of
   the asynchronous process.

src/cmd/ksh93/sh/io.c:
 - Move the code for process substitution with redirection into
   a separate if statement.

src/cmd/ksh93/tests/io.sh:
 - Add two tests for both process substitution bugs fixed by this
   commit.

src/cmd/ksh93/tests/shtests:
 - Update shtests with a patch from Martijn Dekker to use
   pretty-printing for the output from the times builtin (if it
   is available).

Fixes #2
2020-06-23 23:02:16 +01:00
..
args.c Fix process substitution combined with redirection (#40) 2020-06-23 23:02:16 +01: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 Fix process substitution combined with redirection (#40) 2020-06-23 23:02:16 +01:00
jobs.c Fix a crash when 'kill %%' and 'kill %+' are run (#35) 2020-06-22 19:11:49 +02: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 Fix nested functions ignoring prefixed variable assignments (#37) 2020-06-23 00:27:05 +01:00