Commit 6128b88c authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

restorer: Use LAST_PID_PATH directly

After Andrey's work with making restorer a regular .o file we can do it
(the pthread00 test doesn't fail on it).
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 2a76c640
...@@ -1585,10 +1585,6 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid) ...@@ -1585,10 +1585,6 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
cr_mutex_init(&task_args->rst_lock); cr_mutex_init(&task_args->rst_lock);
strncpy(task_args->ns_last_pid_path,
LAST_PID_PATH,
sizeof(task_args->ns_last_pid_path));
if (pstree_entry.nr_threads) { if (pstree_entry.nr_threads) {
int i; int i;
......
...@@ -66,7 +66,6 @@ struct task_restore_core_args { ...@@ -66,7 +66,6 @@ struct task_restore_core_args {
int pid; /* task pid */ int pid; /* task pid */
int fd_core; /* opened core file */ int fd_core; /* opened core file */
int fd_self_vmas; /* opened file with running VMAs to unmap */ int fd_self_vmas; /* opened file with running VMAs to unmap */
char ns_last_pid_path[sizeof(LAST_PID_PATH) + 1];
int logfd; int logfd;
bool restore_threads; /* if to restore threads */ bool restore_threads; /* if to restore threads */
u32 rst_lock; u32 rst_lock;
......
...@@ -441,7 +441,7 @@ long restore_task(struct task_restore_core_args *args) ...@@ -441,7 +441,7 @@ long restore_task(struct task_restore_core_args *args)
long parent_tid; long parent_tid;
int i, fd; int i, fd;
fd = sys_open(args->ns_last_pid_path, O_RDWR, LAST_PID_PERM); fd = sys_open(LAST_PID_PATH, O_RDWR, LAST_PID_PERM);
if (fd < 0) { if (fd < 0) {
write_num_n(__LINE__); write_num_n(__LINE__);
write_num_n(fd); write_num_n(fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment