Improving daemon shutdown and subprocess management.