emit end when the process dies