[CRIU] [PATCH] posix-times: don't fail if /proc/PID/times is absent

Andrey Vagin avagin at openvz.org
Tue Jul 2 08:23:09 EDT 2013


/proc/PID/times was added in 3.10, but FC19 relesead with 3.9.

Usually we support only last version of kernel in the project git, so
we can commit it as an additional patch for the fedora package.

Cc: Adrian Reber <adrian at lisas.de>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 proc_parse.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/proc_parse.c b/proc_parse.c
index 28e2983..57311ec 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -1189,6 +1189,10 @@ int parse_posix_timers(pid_t pid, struct proc_posix_timers_stat *args)
 
 	file = fopen_proc(pid, "timers");
 	if (file == NULL) {
+		if (errno == ENOENT) {
+			pr_warn("Dump of posix timers isn't supported by this kernel\n");
+			return 0;
+		}
 		pr_perror("Can't open posix timers file!");
 		return -1;
 	}
-- 
1.8.3.1



More information about the CRIU mailing list