[CRIU] Re: [PATCH 2/4] image: add functions to close and re-open the
network listen socket
Adrian Reber
adrian at lisas.de
Thu Aug 16 14:43:30 EDT 2012
On Thu, Aug 16, 2012 at 08:10:41PM +0400, Pavel Emelyanov wrote:
> On 08/16/2012 07:56 PM, Adrian Reber wrote:
> > On Wed, Aug 15, 2012 at 02:53:13PM +0400, Pavel Emelyanov wrote:
> >> On 08/15/2012 01:54 PM, Adrian Reber wrote:
> >>> During the restore of the file descriptors all open network
> >>> sockets have to be closed.
> >>
> >> I don't quite understand this requirement. Can you elaborate, please?
> >
> > I think it is during prepare_fs(). If the network socket is still open
> > (using fd=3) prepare_fs() fails if the program to restore wants to open
> > that file descriptor. Maybe there is another way to handle it but
> > closing and later reopening it was my only idea.
>
> We face this when keep an image file with fds open. There's the move_img_fd()
> thing for resolving this conflict, you should use it for image socket as well.
Good to know. I saw the function while I was trying to find a workaround
for the problem with the open FDs but was not sure how to use it. Will
definitely change my code to use it.
Adrian
More information about the CRIU
mailing list