Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1642114
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/8] waitid(2): leave copyout of siginfo to syscall itself |
| Date | 2017-05-16 01:10 +0200 |
| Message-ID | <tHxhM-67w-3@gated-at.bofh.it> (permalink) |
| References | <tHwOJ-5Cw-7@gated-at.bofh.it> <tHwOJ-5Cw-9@gated-at.bofh.it> <tHwOK-5Cw-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 15, 2017 at 3:37 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> +struct waitid_info {
> + pid_t pid;
> + uid_t uid;
> + int status;
> + int why;
> +};
Ugh. Could we please just name those with what they are actually used for?
Even if you hate the "si_" previx for some reason, I really don't see
why we'd continue call it "why", when it's written to "si_code"
Yes, yes, I see the historical reason, and how "si_code" is just the
low 16 bits of "why", and the high 16 bits is something else.
But now that there is a structure for that, could we not just make
that explicit in the structure instead? Those games with "why" look
really odd.
So I can see why you'd like to keep this patch as "minimal
conversion", but it would be really nice to have a followup patch that
gets rid of the odd "why" games.
Linus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/8] move compat wait4 and waitid next to native variants Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 00:40 +0200
[PATCH 3/8] kernel_wait4()/kernel_waitid(): delay copying status to userland Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 00:40 +0200
[PATCH 4/8] waitid(2): leave copyout of siginfo to syscall itself Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 00:40 +0200
Re: [PATCH 4/8] waitid(2): leave copyout of siginfo to syscall itself Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-16 01:10 +0200
Re: [PATCH 4/8] waitid(2): leave copyout of siginfo to syscall itself Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 01:50 +0200
Re: [PATCH 4/8] waitid(2): leave copyout of siginfo to syscall itself ebiederm@xmission.com (Eric W. Biederman) - 2017-05-17 22:00 +0200
csiph-web