• Andrei Vagin's avatar
    fdstore: add a storage for file descriptors (v2) · 4d06aa12
    Andrei Vagin authored
    We need a storage for file descriptors which is shared between processes
    and doesn't use a lot of file descriptors. We are going to use it on
    restore and if it will use file descriptors, we will have to find
    descriptors which don't used by all restored processes to not confilict
    with their descriptors.
    
    There are two solutions. The first one is a service (process) which
    handles to command push_fd(id, fd) and pop_fd(id, fd).
    
    Another solution is to save descriptros in a unix socket.  It requires
    only one extra descriptor which we can register as a service fd. Each
    unix socket has a buffer and can fit a number of file descriptros. We
    can use SK_PEEK_OFF and MSG_PEEK to get file descriptros from a socket
    as many times as we need.
    
    This patch implements the second solution.
    
    v2: call recvmsg with MSG_PEEK
    travis-ci: success for A few fixes to c/r a docker container with a console (rev3)
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    4d06aa12
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...