diff --git a/criu/cr-dump.c b/criu/cr-dump.c index 0e31da572..78648baeb 100644 --- a/criu/cr-dump.c +++ b/criu/cr-dump.c @@ -1468,10 +1468,11 @@ static int setup_alarm_handler() return 0; } -static int cr_pre_dump_finish(int ret) +static int cr_pre_dump_finish(int status) { InventoryEntry he = INVENTORY_ENTRY__INIT; struct pstree_item *item; + int ret; /* * Restore registers for tasks only. The threads have not been @@ -1489,6 +1490,11 @@ static int cr_pre_dump_finish(int ret) timing_stop(TIME_FROZEN); + if (status < 0) { + ret = status; + goto err; + } + pr_info("Pre-dumping tasks' memory\n"); for_each_pstree_item(item) { struct parasite_ctl *ctl = dmpi(item)->parasite_ctl;