tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: updates?
In article <CA+SXE9t2KmC8rsdohdTtaXQLPV44L=Jbuco6X1cT4+7FjWQ12Q%mail.gmail.com@localhost>,
Charles Cui <charles.cui1984%gmail.com@localhost> wrote:
>-=-=-=-=-=-
>
>I will study FreeBSD logic first and share with you guys.
>
>2016-07-17 6:39 GMT-07:00 Christos Zoulas <christos%zoulas.com@localhost>:
>
>> On Jul 17, 2:02am, charles.cui1984%gmail.com@localhost (Charles Cui) wrote:
>> -- Subject: Re: updates?
>>
>> | Hi Christos,
>> |
>> | I considered the questions that you asked.
>> | Here is another patch that improves the previous one in terms of error
>> | checking
>> |
>>
>https://github.com/ycui1984/posixtestsuite/blob/master/patches/SIGNAL/0003-improve-error-checking.patch
I think it is better instead of using ret = -1, to set error =
EAGAIN, from the beginning and return 0 for success and error (with
errno) for failure like other kernel functions do.
>-=-=-=-=-=-
What I would do now is write a synthetic test using
sigqueue and sigprocmask to queue a bunch of signals and then release
the mask and test for delivery order. Something like:
int siglist[] = {
SIGINT, SIGSEGV, SIGRTMIN + 2, SIGRTMIN + 1, SIGINT, SIGRTMIN + 1,
SIGRTMIN + 2, ...
};
void
handler(int sig, siginfo_t *info, void *aux) {
/* check signal order and sigval */
}
...
/* block signals you want delivered */
/* setup a handler for the signals you want to deliver */
for (size_t i = 0; i < __arraycount(siglist); i++)
/* queue signals you want to deliver */
/* unblock signals... */
/* pause until all signals have been delivered */
...
I would run this on different OS's to see what they do...
christos
Home |
Main Index |
Thread Index |
Old Index