move current process handling before exit