robustly handle prematurely quitting process