Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions criu/cr-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "tty.h"
#include "net.h"
#include "sk-packet.h"
#include "sk-queue.h"
#include "cpu.h"
#include "elf.h"
#include "cgroup.h"
Expand Down Expand Up @@ -2314,6 +2315,9 @@ int cr_dump_tasks(pid_t pid)
if (tty_post_actions())
goto err;

if (sk_queue_post_actions())
goto err;

if (inventory_save_uptime(&he))
goto err;

Expand Down
4 changes: 4 additions & 0 deletions criu/cr-restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ static int root_prepare_shared(void)
if (ret)
goto err;

ret = add_fake_unix_queuers_finish();
if (ret)
goto err;

ret = run_post_prepare();
if (ret)
goto err;
Expand Down
7 changes: 6 additions & 1 deletion criu/include/sk-queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
#define __CR_SK_QUEUE_H__

extern struct collect_image_info sk_queues_cinfo;
extern int dump_sk_queue(int sock_fd, int sock_id);

#define SK_QUEUE_REAL_PID 0x1 /* scm creds contains a real pid */
#define SK_QUEUE_DUMP_ADDR 0x2 /* save a sender address for messages */
#define SK_QUEUE_TRACK_ENOBUFS 0x4 /* don't fail at ENOBUFS, fill *val if it is present */
extern int dump_sk_queue(int sock_fd, int sock_id, int flags, int *val);
extern int sk_queue_post_actions(void);
extern int restore_sk_queue(int fd, unsigned int peer_id);

#endif /* __CR_SK_QUEUE_H__ */
1 change: 1 addition & 0 deletions criu/include/sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extern int collect_sockets(struct ns_id *);
extern struct collect_image_info inet_sk_cinfo;
extern struct collect_image_info unix_sk_cinfo;
extern int add_fake_unix_queuers(void);
extern int add_fake_unix_queuers_finish(void);
extern int fix_external_unix_sockets(void);
extern int prepare_scms(void);
extern int unix_note_scm_rights(int id_for, uint32_t *file_ids, int *fds, int n_ids);
Expand Down
Loading
Loading