1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

tests/subshell.sh: replace use of unportable seq command

This commit is contained in:
Martijn Dekker 2021-05-03 21:51:03 +01:00
parent 7a2d3564b6
commit 1a1e3709c2

View file

@ -477,9 +477,14 @@ then EXP=$(printf %q "$exp")
err_exit "'$cmd' failed -- expected $EXP, got $GOT"
fi
(
$SHELL -c 'sleep 20 & pid=$!; { x=$( ( seq 60000 ) );kill -9 $pid;}&;wait $pid'
) 2> /dev/null
("$SHELL" -c '
sleep 20 & pid=$!
{
x=$( ( "$SHELL" -c "integer i; for((i=1;i<=60000;i++)); do print \$i; done" ) )
kill -9 $pid
} &
wait $pid
') 2> /dev/null
(( $? )) || err_exit 'nested command substitution with large output hangs'
(.sh.foo=foobar)