emit code and signal on child_error