Kill the parent after any error conditions in detach().