mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
files: Correctly handle tasks with no open file descriptors
Do not fail, if task doesn't have open files. This fixes zdtm/static/fd test, which is broken now: (00.004411) Error (cr-dump.c:1312): Dump files (pid: 25) failed with -1 (00.004548) Error (cr-dump.c:1614): Dumping FAILED. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
cabfbbef36
commit
2bf231496f
1 changed files with 1 additions and 0 deletions
|
|
@ -481,6 +481,7 @@ int dump_task_files_seized(struct parasite_ctl *ctl, struct pstree_item *item,
|
|||
if (!img)
|
||||
goto err;
|
||||
|
||||
ret = 0; /* Don't fail if nr_fds == 0 */
|
||||
for (off = 0; off < dfds->nr_fds; off += nr_fds) {
|
||||
if (nr_fds + off > dfds->nr_fds)
|
||||
nr_fds = dfds->nr_fds - off;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue