criu/lib/c
Zeyad Yasser e3c9c3429a cr-service: add pidfd_store_sk option to rpc.proto
pidfd_store_sk option will be used later to store tasks pidfds
between predumps to detect pid reuse reliably.
pidfd_store_sk should be a fd of a connectionless unix socket.

init_pidfd_store_sk() steals the socket from the RPC client using
pidfd_getfd, checks that it is a connectionless unix socket and
checks if it is not initialized before (i.e. unnamed socket).
If not initialized the socket is first bound to an abstract name
(combination of the real pid/fd to avoid overlap), then it is
connected to itself hence allowing us to store the pidfds in the
receive queue of the socket (this is similar to how fdstore_init()
works).

v2:
	- avoid close(pidfd) overriding errno of SYS_pidfd_open in
	  init_pidfd_store_sk()
	- close pidfd_store_sk because we might have leftover from
	  previous iterations

Signed-off-by: Zeyad Yasser <zeyady98@gmail.com>
2021-09-03 10:31:00 -07:00
..
criu.c cr-service: add pidfd_store_sk option to rpc.proto 2021-09-03 10:31:00 -07:00
criu.h cr-service: add pidfd_store_sk option to rpc.proto 2021-09-03 10:31:00 -07:00
criu.pc.in build: Move C and Python libraries into lib 2016-02-15 15:32:39 +03:00
Makefile compel: no -r for ARM ldflags 2017-04-02 18:12:10 +03:00