standards/170346: Changes to support waitid() and related stuff
Konstantin Belousov
kostikbel at gmail.com
Mon Aug 20 10:44:19 UTC 2012
On Sat, Aug 18, 2012 at 10:10:11AM +0000, Jukka A. Ukkonen wrote:
Some my notes:
- the style requires tab after #define, not space, in particular,
in sys/wait.h. Other style notes: there should be no space between
() and variable for type cast, and space, not tab, between 'case'
and case constant.
You are adding uneccessary blank lines, esp. in the kern_wait6.
The libc/gen/waitid.c shall be reformatted fully.
- you can reduce the namespace pollution by using struct __siginfo instead
of siginfo_t in the new prototypes added into sys/wait.h.
- do not use the low syscall numbers for new syscalls, just add at the
end of the table.
- you need to provide compat32 translation for new syscalls, see
compat/freebsd32/syscalls.master as the starting point.
- the comment 'New siginfo stuff...' seems to not provide any useful
information.
- I do not think we need to enumerate other OSes in comments which provide
similar functionality. Just noting that resource usage is provided for
both zombies and snapshotted for live process will be good.
- please wrap long line in kern_wait6.
- why do you zero siginfo in case of returning EINVAL from kern_wait6 ?
Same question for assigning -1 to td_reval[0]. td_retval is ignored at all
if error is indicated.
There seems to be similar fragment for WNOHANG, why do you zero siginfo
for the case when the process is not found ? Shouldn't the caller
not to copy out the siginfo at all in this case ?
- in waitid.c, why do you even consider the case of ret != 0 or -1 ?
How can it be ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-standards/attachments/20120820/29284d4a/attachment.pgp
More information about the freebsd-standards
mailing list