Re: [RFC][PATCH 09/10] taskstats: Fix exit CPU time accounting

From: Roland McGrath
Date: Wed Sep 29 2010 - 15:20:29 EST


> > I would consider it to be a BUG() that the time is not accounted.
> > Independent of the fact that a parent wants to see the SIGCHLD and
> > the exit status of its child the process time of the child should be
> > accounted, no?
>
> I do not know. It doesn't look like a BUG(), I mean it looks as if
> the code was intentionally written this way.

POSIX specifies this behavior: "If the child is never waited for (for
example, if the parent has SA_NOCLDWAIT set or sets SIGCHLD to SIG_IGN),
the resource information for the child process is discarded and not
included in the resource information provided by getrusage()."


Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/