tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: updates?



Please see my comments below.

2016-07-20 7:47 GMT-07:00 Christos Zoulas <christos%astron.com@localhost>:

> 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.
>
I did not quite understand it.
https://github.com/ycui1984/posixtestsuite/blob/master/patches/REALTIME_SIGNAL/0004-improve-error-checking.patch
This patch removes all ret = -1 logics, and set error at kpsignal2,
did you want to set error code inside sigput?

>-=-=-=-=-=-
>
> 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...
>
The handling order of realtime signal and standard signals are not defined
by POSIX.
Some OSes handle realtime signal in FIFO order, but some select the
realtime signal with lowest number first.
It's still good to know the real results, though.


> christos
>
>


Home | Main Index | Thread Index | Old Index