forking to prevent hangs