• Pavel Emelyanov's avatar
    sig: Don't reset CHLD handler to old action, DFL it · e50d0e7c
    Pavel Emelyanov authored
    The whole idea behind this code was to stop receiving CHLD from
    restored tasks after resume. The comment about this is done for
    scripts is wrong (we call more scripts before this) because
    sigchld_handler() knows about scripts:
    
    commit de71bc69
    	 exit = (siginfo->si_code == CLD_EXITED);
    	 status = siginfo->si_status;
    	+
    	+       /* skip scripts */
    	+       if (!current && root_item->pid.real != pid) {
    	+               pid = waitpid(root_item->pid.real, &status, WNOHANG);
    	+               if (pid <= 0)
    	+                       return;
    	+       }
    
    And since CHLD handler makes little sence after exec, it's easier
    just to reset one to default action at the end.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
    e50d0e7c
cr-restore.c 59.2 KB