gc.sh: small optimization when dealing with forks