• Cyrill Gorcunov's avatar
    unix: Add support of ghost sockets · 4691dcf3
    Cyrill Gorcunov authored
    Unix sockets may be connected via deleted socket name,
    moreover the name may be reused (ie same sun_addr but
    different inodes).
    
    To be able to handle them we do a few tricks:
    
     - when collecting sockets we figure out if "deleted"
       mark is present on the socket and if such we order
       this sockets creation and deletion with mutex, together
       with adding missing directories, and save this descriptors
       in fdstore if there are peers connected to
    
     - on restore we connect via procfs/fd/X as suggested by
       Andrew Vagin
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    4691dcf3
cr-restore.c 77.6 KB