[CRIU] [PATCH] dump: Show task comm early

Pavel Emelyanov xemul at virtuozzo.com
Fri Jul 15 11:32:42 PDT 2016


On 07/15/2016 09:26 PM, Cyrill Gorcunov wrote:
> On Wed, Jul 13, 2016 at 04:47:57PM +0300, Cyrill Gorcunov wrote:
>> On Wed, Jul 13, 2016 at 04:46:43PM +0300, Pavel Emelyanov wrote:
>>>>  
>>>> +char *task_comm_info(pid_t pid, char *comm, size_t size)
>>>> +{
>>>> +	int ret = 0;
>>>> +
>>>> +	if (!pr_quelled(LOG_INFO)) {
>>>> +		int saved_errno = errno;
>>>> +		char path[64];
>>>> +		int fd;
>>>> +
>>>> +		snprintf(path, sizeof(path), "/proc/%d/comm", pid);
>>>> +		fd = open(path, O_RDONLY);
>>>
>>> I'm not happy with the fact that we mess with /proc every time we need it.
>>> Can we pick this info from ... the data we read with parse_proc_pid_stat()?
>>
>> Parsing stat happens on already seized tasks, but we wanna output earlier.
> 
> It was based on patch

It?

> 	https://lists.openvz.org/pipermail/criu/2016-May/028813.html
> 
> which get lost :/
> 
> 	Cyrill
> .
> 



More information about the CRIU mailing list