summaryrefslogtreecommitdiffhomepage
path: root/tests/proc/subshell-pure.sh
blob: 0ef7a9e168a55d7e195e89ff1dd537fbf42bf316 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 50 subshells whose body can change nothing outside, then two more.
# cd saves/restores the cwd so it too can run in-process.
# The counters tell them apart from a real fork.
i=0
while [ $i -lt 50 ]; do
    ( true )
    i=$((i + 1))
done
( echo a )
( cd /tmp )
echo done