Stops processes after exit

Ends all opened processes after exit.