mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-24 02:35:41 +00:00
When we've read all pstree-items and their ids we can get the desired clone-flags early and avoid all these dances with flag calculations in fork_with_pid and company. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
26 lines
596 B
C
26 lines
596 B
C
#ifndef __CR_NS_H__
|
|
#define __CR_NS_H__
|
|
|
|
#include "crtools.h"
|
|
#include "pstree.h"
|
|
|
|
int dump_namespaces(struct pid *pid, unsigned int ns_flags);
|
|
int prepare_namespace(int pid, unsigned long clone_flags);
|
|
struct cr_options;
|
|
int try_show_namespaces(int pid, struct cr_options *);
|
|
|
|
struct ns_desc {
|
|
unsigned int cflag;
|
|
char *str;
|
|
};
|
|
|
|
int switch_ns(int pid, struct ns_desc *nd, int *rst);
|
|
int restore_ns(int rst, struct ns_desc *nd);
|
|
extern struct ns_desc pid_ns_desc;
|
|
|
|
struct pstree_item;
|
|
int dump_task_ns_ids(struct pstree_item *);
|
|
|
|
extern unsigned long current_ns_mask;
|
|
|
|
#endif /* __CR_NS_H__ */
|