From ae4fd07ca5c09482fa5a78f3ede0d31a4b5ff63e Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Thu, 20 Feb 2020 21:10:23 +0000 Subject: [PATCH] libcriu: Add orphan pts master The orphan pts master option was introduced with commit [1] to enable checkpoint/restore of containers with a pty pair used as a console. [1] https://github.com/checkpoint-restore/criu/commit/6afe523d97d59e6bf29621b8aa0e6a4332f710fc Signed-off-by: Radostin Stoyanov --- lib/c/criu.c | 11 +++++++++++ lib/c/criu.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/lib/c/criu.c b/lib/c/criu.c index 1d0a235f4..2ac18ade9 100644 --- a/lib/c/criu.c +++ b/lib/c/criu.c @@ -541,6 +541,17 @@ void criu_set_shell_job(bool shell_job) criu_local_set_shell_job(global_opts, shell_job); } +void criu_local_set_orphan_pts_master(criu_opts *opts, bool orphan_pts_master) +{ + opts->rpc->has_orphan_pts_master = true; + opts->rpc->orphan_pts_master = orphan_pts_master; +} + +void criu_set_orphan_pts_master(bool orphan_pts_master) +{ + criu_local_set_orphan_pts_master(global_opts, orphan_pts_master); +} + void criu_local_set_file_locks(criu_opts *opts, bool file_locks) { opts->rpc->has_file_locks = true; diff --git a/lib/c/criu.h b/lib/c/criu.h index 22db0fdcf..3a9204f5b 100644 --- a/lib/c/criu.h +++ b/lib/c/criu.h @@ -72,6 +72,7 @@ void criu_set_tcp_close(bool tcp_close); void criu_set_weak_sysctls(bool val); void criu_set_evasive_devices(bool evasive_devices); void criu_set_shell_job(bool shell_job); +void criu_set_orphan_pts_master(bool orphan_pts_master); void criu_set_file_locks(bool file_locks); void criu_set_track_mem(bool track_mem); void criu_set_auto_dedup(bool auto_dedup); @@ -185,6 +186,7 @@ void criu_local_set_tcp_close(criu_opts *opts, bool tcp_close); void criu_local_set_weak_sysctls(criu_opts *opts, bool val); void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices); void criu_local_set_shell_job(criu_opts *opts, bool shell_job); +void criu_local_set_orphan_pts_master(criu_opts *opts, bool orphan_pts_master); void criu_local_set_file_locks(criu_opts *opts, bool file_locks); void criu_local_set_track_mem(criu_opts *opts, bool track_mem); void criu_local_set_auto_dedup(criu_opts *opts, bool auto_dedup);