[CRIU] [PATCH] pre-dump: avoid sleeping in the open() syscall
Andrey Vagin
avagin at openvz.org
Wed Mar 12 03:43:24 PDT 2014
For example opening the FIFO blocks until the other end is opened also.
We can use O_PATH to avoid sleeping in the open() call.
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
files.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/files.c b/files.c
index e2fb8eb..e6a32ee 100644
--- a/files.c
+++ b/files.c
@@ -416,7 +416,7 @@ static int predump_one_fd(int pid, int fd)
* enightened version without fds draining.
*/
- lfd = open_proc(pid, "fd/%d", fd);
+ lfd = __open_proc(pid, O_PATH | O_RDONLY, "fd/%d", fd);
if (lfd < 0)
return 0; /* That's OK, it can be a socket */
--
1.8.5.3
More information about the CRIU
mailing list