mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	tests/subshell.sh: fix a test for systems without /dev/fd/*
ksh's built-in test, [ and [[ commands treat /dev/fd/* specially: e.g. 'test /dev/fd/0' returns true even if it doesn't physically exist, as on e.g. HP-UX. However, external commands need it to exist physically. src/cmd/ksh93/tests/subshell.sh: - To decide whether to run a test with 'tee', use external 'test' command to check if /dev/stdout and /dev/fd/1 actually exist.
This commit is contained in:
		
							parent
							
								
									bc8b36faba
								
							
						
					
					
						commit
						0c96f9749b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -625,7 +625,7 @@ $SHELL <<- \EOF
 | 
			
		|||
EOF
 | 
			
		||||
 | 
			
		||||
for f in /dev/stdout /dev/fd/1
 | 
			
		||||
do	if	[[ -e $f ]]
 | 
			
		||||
do	if	"${ whence -p test; }" -e "$f"
 | 
			
		||||
	then	$SHELL -c "x=\$(command -p tee $f </dev/null 2>/dev/null)" || err_exit "$f in command substitution fails"
 | 
			
		||||
	fi
 | 
			
		||||
done
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue