Skip to content

Commit

Permalink
tests/functions.sh: speed up a test
Browse files Browse the repository at this point in the history
  • Loading branch information
McDutchie committed Sep 28, 2020
1 parent ceb77b1 commit f527706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/ksh93/tests/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ read -n4 c < $0 2> /dev/null
ulimit -c 0

binecho=$(whence -p echo)
bin_sleep=$(whence -p sleep)

integer foo=33
bar=bye
Expand Down Expand Up @@ -1120,13 +1121,12 @@ function foo
bar=bam
foo

sleep=$(whence -p sleep)
function gosleep
{
$sleep 4
"$bin_sleep" 1
}
x=$(
(sleep 2; pid=; ps | grep sleep | read pid extra; [[ $pid ]] && kill -- $pid) &
(sleep .25; pid=; ps | grep sleep | read pid extra; [[ $pid ]] && kill -- "$pid") &
gosleep 2> /dev/null
print ok
)
Expand Down

0 comments on commit f527706

Please sign in to comment.