remove duplication in the child signal handling.