Graceful shutdown of processes.