[CRIU] [PATCH] zdtm: pty00 -- Count for SIGHUP

Andrew Vagin avagin at parallels.com
Fri Aug 15 05:57:10 PDT 2014


On Fri, Aug 15, 2014 at 04:44:13PM +0400, Cyrill Gorcunov wrote:
> On Fri, Aug 15, 2014 at 04:41:30PM +0400, Andrew Vagin wrote:
> > >  
> > >  	/* Check connectivity */
> > >  	ret = write(fdm, teststr, sizeof(teststr) - 1);
> > > @@ -77,7 +96,11 @@ int main(int argc, char ** argv)
> > 
> > I think we should set sigaction here. Otherwise you don't check that a
> > signal is received in a right place.
> 
> As far as I understand we should not receive SIGHUP until close, so that
> if for some reason we're gitting it earlier it should be an error, no?

Yes. If we don't set sigaction, SIGHUP will kill us, so we will fail.

You can leave sigaction where it's now and check the counter before
closing the master point.


More information about the CRIU mailing list