2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 22:35:33 +00:00

show: Don't forget to open sockets queue descriptor before accessing it

Otherwise I'm getting errors like

CR_FD_SK_QUEUES
----------------
Error (./include/util.h:102): Can't read img file: Bad file descriptor
----------------

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Cyrill Gorcunov
2012-03-02 11:09:39 +04:00
parent a26d524011
commit 8a8ce9b342
2 changed files with 2 additions and 1 deletions

View File

@@ -551,7 +551,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts)
LIST_HEAD(pstree_list);
int i, ret = -1;
cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE);
cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE | CR_FD_DESC_SK_QUEUES);
if (!cr_fdset)
goto out;

View File

@@ -101,6 +101,7 @@ struct cr_fdset {
#define CR_FD_DESC_USE(type) ((1 << (type)))
#define CR_FD_DESC_CORE CR_FD_DESC_USE(CR_FD_CORE)
#define CR_FD_DESC_PSTREE CR_FD_DESC_USE(CR_FD_PSTREE)
#define CR_FD_DESC_SK_QUEUES CR_FD_DESC_USE(CR_FD_SK_QUEUES)
#define CR_FD_DESC_TASK (\
CR_FD_DESC_USE(CR_FD_FDINFO) |\
CR_FD_DESC_USE(CR_FD_PAGES) |\