Tracking termination of processes