[CRIU] [PATCH v2 4/8] memory: don't use parent memdump if detected possible pid reuse
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Tue Feb 13 18:58:22 MSK 2018
On 02/13/2018 10:36 AM, Andrew Vagin wrote:
>> + ret = parse_pid_stat(item->pid->real, &pps_buf);
> I don't like the idea to parse /proc/pid/stat.
> Can we use ctime for /proc/PID?
>
It seems we can not.
Correct me if I'm wrong, but it seem that inode creation time is
initialized when we first access it but _not_ at the process creation time:
#1
sleep 1000&
pid=$!
date +%H:%M:%S.%N
sleep 1
stat /proc/$pid | grep Change
kill $pid
18:53:59.393336874
Change: 2018-02-13 18:54:00.401236071 +0300
#2
sleep 1000&
pid=$!
stat /proc/$pid | grep Change
sleep 1
date +%H:%M:%S.%N
kill $pid
Change: 2018-02-13 18:54:00.410236147 +0300
18:54:01.419285696
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
More information about the CRIU
mailing list