. $STF_SUITE/tests/functional/mv_files/mv_files.cfg
-#
-# Determine whether this version of the ksh being
-# executed has a bug where the limit of background
-# processes of 25.
-#
-function check_bg_procs_limit_num
-{
-echo "#!/bin/ksh" > $TEST_BASE_DIR/exitsZero.ksh
-echo "exit 0" >> $TEST_BASE_DIR/exitsZero.ksh
-chmod 777 $TEST_BASE_DIR/exitsZero.ksh
-
-cat <<EOF > $TEST_BASE_DIR/testbackgprocs.ksh
-#!/bin/ksh
-#
-# exitsZero.ksh is a one line script
-# that exit with status of "0"
-#
-
-PIDS=""
-typeset -i i=1
-while [ \$i -le 50 ]
-do
- $TEST_BASE_DIR/exitsZero.ksh &
- PIDS="\$PIDS \$!"
- (( i = i + 1 ))
-done
-
-sleep 1
-
-for pid in \$PIDS
-do
- wait \$pid
- (( \$? == 127 )) && exit 1
-done
-exit 0
-EOF
-
-ksh $TEST_BASE_DIR/testbackgprocs.ksh
-if [[ $? -eq 1 ]]; then
-#
-# Current ksh being executed has a limit
-# of 25 background processes.
-#
- return 1
-else
- return 0
-fi
-}
-
function init_setup
{
verify_runnable "global"
-check_bg_procs_limit_num
-if [[ $? -ne 0 ]]; then
+#
+# Determine whether this version of the ksh being
+# executed has a bug where the limit of background
+# processes of 25.
+#
+(
+ pids=
+ for _ in $(seq 50); do
+ : &
+ pids="$pids $!"
+ done
+
+ for pid in $pids; do
+ wait $pid || exit
+ done
+) || {
log_note "ksh background process limit number is 25"
- export GANGPIDS=25
-fi
-
-export PIDS=""
+ GANGPIDS=25
+}
init_setup $DISK