This fixes the possibility that ghc-process-running was left non-nil after timeout. Quit still can abort the loop.