gc.sh: overhaul how forks are handled during gc