[CRIU] [PATCH 0/3 v3] crtools: close a signal descriptor after passing a preparation stage

Adrian Reber adrian at lisas.de
Thu Jan 12 02:46:54 PST 2017


On Wed, Jan 11, 2017 at 12:28:08PM -0800, Andrei Vagin wrote:
> On Wed, Jan 11, 2017 at 08:36:20AM +0100, Adrian Reber wrote:
> > On Wed, Jan 11, 2017 at 12:21:42AM +0300, Andrei Vagin wrote:
> > > This patch adds the --siganl-fd FD option to specify a file descriptor.
> > > CRIU will write '\0' to this descriptor and close it after passing
> > > a preparation stage.
> > > 
> > > It is alternative way to demonizing a criu process after a preparation
> > > stage. It's imposiable to get exit code, if a process has daemonized.
> > > 
> > > The introduced way allows to wait a preparation stage and to get an exit
> > > code. It can be easy used from shell and other script languages.
> > 
> > As I am currently looking at runc and criu lazy-pages I want to make
> > sure I understand this correctly. It sounds like I could pass a FD to
> > criu and start in in lazy-page mode. Once criu reaches the point where I
> > can make TCP connections to request lazy pages this FD will be closed,
> > right?
> 
> Yes

Perfect! I was able to use your patch to integrate post-copy migration
into runc. As long as forked processes are not possible it is still
limited, but at least it works for single process containers! Great!

		Adrian


More information about the CRIU mailing list