tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Proposal for new syscalls: getrusagex and waitx
On Thu, Oct 16, 2008 at 10:09:39PM -0700, Matt Thomas wrote:
> I'd to add return some additional data in getrusage or wait4. Extending
> struct rusage seems to be a losing proposition since I will need to version
> the syscalls and provide compatiblity shims. I might as well just add
> variants that return proplib dictionaries with the information.
>
> int getrusagex(int who, struct plistref *dict)
> int waitx(pid_t wpid, int *status, int options, struct plistref *rusage);
That should be wait5, for consistency with the various other forms of
wait.
More importantly, however, do you expect the additional data to be of
interest to 3rd-party callers? Because if so we'll end up doing all
the same versioning to provide an extended struct rusage to them,
except that it'll have to be done in libc where such versioning is
much harder. That's not a win.
It is not reasonable to expect that 3rd-party callers are going to
wade through a proplist, especially since the existence and some of
the contents of struct rusage are defined by the pertinent standards.
So unless what you're intending to add is of no value except to one or
two system utilities, this doesn't seem like a good idea. (And if it
is only of such value, it seems like there are simpler ways to
proceed.)
> As for the items I want to add, a description of those can wait for later.
Well, no, I think that's pretty important, for the above reasons.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index