2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

protobuf: Convert sa_entry to PB format

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-07-18 16:25:06 +04:00
committed by Pavel Emelyanov
parent b75d66e7df
commit 6b9d3affc9
6 changed files with 31 additions and 21 deletions

View File

@@ -49,6 +49,9 @@
#include "inotify.h"
#include "pstree.h"
#include "protobuf.h"
#include "protobuf/sa.pb-c.h"
static struct pstree_item *me;
static int restore_task_with_children(void *);
@@ -194,7 +197,7 @@ static int prepare_sigactions(int pid)
{
rt_sigaction_t act, oact;
int fd_sigact;
struct sa_entry e;
SaEntry *e;
int sig;
int ret = -1;
@@ -206,14 +209,16 @@ static int prepare_sigactions(int pid)
if (sig == SIGKILL || sig == SIGSTOP)
continue;
ret = read_img(fd_sigact, &e);
ret = pb_read(fd_sigact, &e, sa_entry);
if (ret < 0)
break;
ASSIGN_TYPED(act.rt_sa_handler, e.sigaction);
ASSIGN_TYPED(act.rt_sa_flags, e.flags);
ASSIGN_TYPED(act.rt_sa_restorer, e.restorer);
ASSIGN_TYPED(act.rt_sa_mask.sig[0], e.mask);
ASSIGN_TYPED(act.rt_sa_handler, e->sigaction);
ASSIGN_TYPED(act.rt_sa_flags, e->flags);
ASSIGN_TYPED(act.rt_sa_restorer, e->restorer);
ASSIGN_TYPED(act.rt_sa_mask.sig[0], e->mask);
sa_entry__free_unpacked(e, NULL);
if (sig == SIGCHLD) {
sigchld_act = act;