2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 08:45:49 +00:00

Use openat() helper intensively when opening /proc/pid/X files

This allows us to get rid of open-coded "/proc/pid/X".

Based-on-patch-from: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-01-12 23:50:45 +04:00
parent b0a9533080
commit 995ef5eca3
6 changed files with 148 additions and 121 deletions

View File

@@ -1,10 +1,12 @@
#ifndef CR_SOCKETS_H__
#define CR_SOCKETS_H__
#include <sys/types.h>
#include <unistd.h>
#include <stdbool.h>
struct cr_fdset;
extern int try_dump_socket(char *dir_name, char *fd_name, struct cr_fdset *cr_fdset);
extern int try_dump_socket(pid_t pid, char *fd_name, struct cr_fdset *cr_fdset);
extern int collect_sockets(void);
extern int prepare_sockets(int pid);