From ca0b51bc00bb2b4d5195924362ca25eae3692d27 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Sun, 3 Nov 2013 17:37:10 +0400 Subject: [PATCH] rst: Close logdir earlier Just a code sanitation. Signed-off-by: Pavel Emelyanov --- cr-restore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cr-restore.c b/cr-restore.c index b29a8b7bb..b306cbddd 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -719,8 +719,6 @@ static int restore_one_alive_task(int pid, CoreEntry *core) if (prepare_sigactions(pid)) return -1; - log_closedir(); - if (open_vmas(pid)) return -1; @@ -854,6 +852,9 @@ static int restore_one_task(int pid, CoreEntry *core) { int ret; + /* No more fork()-s => no more per-pid logs */ + log_closedir(); + switch ((int)core->tc->task_state) { case TASK_ALIVE: case TASK_STOPPED: