fdstore: add a storage for file descriptors (v2)
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:Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
criu/fdstore.c
0 → 100644
criu/include/fdstore.h
0 → 100644
Please
register
or
sign in
to comment