[CRIU] [PATCH] service: SIGCHLD handler

Andrew Vagin avagin at parallels.com
Wed Oct 30 14:23:54 PDT 2013


On Thu, Oct 31, 2013 at 04:51:47AM +0400, Ruslan Kuprieiev wrote:
> >>@@ -323,16 +368,31 @@ int cr_service(bool daemon_mode)
> >>  		}
> >>  	}
> >>-	/* FIXME Do not ignore children's return values */
> >>-	signal(SIGCHLD, SIG_IGN);
> >>+	/* Set SIGCHLD handler */
> >>+	sigemptyset(&block_mask);
> >>+
> >>+	sigaddset(&block_mask, SIGCHLD);
> >>+
> >>+	/* FIXME May need to block some other signals too */
> >I think we don't need to block only SIGCHLD.
> 
> If we will not block SIGCHLD, it may be received during treating the
> status by handler.
> In v2 patch, still block SIGCHLD, but handler works until there is
> no children that have changed their status.
>

Of course I wanted to say that we need to block only SIGCHLD;)


More information about the CRIU mailing list