Run if a defined process is closed