From e9aed2ed380061e7f369fed44eae4c8ced288f64 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Mon, 1 Feb 2016 17:23:00 +0300 Subject: [PATCH] plugin: Add PRE_DUMP stage into plugins It is missged in first place and may cause problem on exiting via alarm hanling. Reported-by: Igor Sukhih Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- 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 4ac3eed1e..cbf48e33b 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 4be697b0c..b76f5f839 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