[CRIU] [PATCH] plugin: Add PRE_DUMP stage into plugins
Cyrill Gorcunov
gorcunov at gmail.com
Mon Feb 1 06:23:02 PST 2016
It is missged in first place and may cause
problem on exiting via alarm hanling.
Reported-by: Igor Sukhih <igor at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
---
cr-dump.c | 3 +++
include/criu-plugin.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/cr-dump.c b/cr-dump.c
index 4ac3eed..cbf48e3 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1466,6 +1466,9 @@ int cr_pre_dump_tasks(pid_t pid)
if (init_stats(DUMP_STATS))
goto err;
+ if (cr_plugin_init(CR_PLUGIN_STAGE__PRE_DUMP))
+ goto err;
+
if (kerndat_init())
goto err;
diff --git a/include/criu-plugin.h b/include/criu-plugin.h
index 4be697b..b76f5f8 100644
--- a/include/criu-plugin.h
+++ b/include/criu-plugin.h
@@ -66,6 +66,7 @@ DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__DUMP_EXT_LINK, int index, int type, cha
enum {
CR_PLUGIN_STAGE__DUMP,
+ CR_PLUGIN_STAGE__PRE_DUMP,
CR_PLUGIN_STAGE__RESTORE,
CR_PLUGIN_STAGE_MAX
--
2.5.0
More information about the CRIU
mailing list