On Mon, Jan 15, 2018 at 11:02 AM, Nadav Har'El <[email protected]> wrote:

>
>
> +
>> +static int pselect6(int nfds, fd_set *readfds, fd_set *writefds,
>> +                   fd_set *exceptfds, const struct timespec *timeout_ts,
>> +                   void *sig)
>> +{
>> +    const sigset_t *sigmask = NULL;
>> +    if(sig) {
>> +        debug_always("pselect6(): unimplemented with not-null
>> sigmask\n");
>> +        errno = ENOSYS;
>> +        return -1;
>> +    }
>>
>
> Why didn't you just  take a sigset_t *sig and pass it on to pselect()? Why
> was it important to check that sig==0?
>

I think I figured it out... Acording to select(2),














*The  final  argument  of the pselect6() system call is not a sigset_t
*       pointer, but is instead a structure of the form:           struct
{               const kernel_sigset_t *ss;   /* Pointer to signal set
*/               size_t ss_len;               /* Size (in bytes) of
object                                               pointed to by 'ss'
*/           };       This allows the system call to obtain both a pointer
to the signal  set       and  its size, while allowing for the fact that
most architectures sup‐       port a maximum of 6 arguments to a system
call.  See sigprocmask(2) for       a  discussion  of  the difference
between the kernel and libc notion of       the signal set.*

Perhaps you should mention this in a comment explaining why we're defering
implementing this to later?

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to