only run kill_group in the parent

this fixes an infinite loop in the child process if it exits upon an
error before exec