[CRIU] [PATCH] posix-times: don't fail if /proc/PID/times is absent
Pavel Emelyanov
xemul at parallels.com
Tue Jul 2 08:29:40 EDT 2013
On 07/02/2013 07:23 PM, Andrey Vagin wrote:
> /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.
No, it's OK to keep in in HEAD. We do the same e.g. for sock diag.
> 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;
> + }
This would result in existing, though empty, posix-timers.img file. Is it difficult
to avoid that?
> pr_perror("Can't open posix timers file!");
> return -1;
> }
>
More information about the CRIU
mailing list