[CRIU] [PATCH] dump: Show task comm early
Cyrill Gorcunov
gorcunov at gmail.com
Wed Jul 13 06:47:57 PDT 2016
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.
More information about the CRIU
mailing list