The sigwaitinfo ( ) function selects the pending signal from the set specified by set.
The lowest pending signal should be selected first numbered one, if it is one of multiple
pending signals in the range SIGRTMIN to SIGRTMAX be selected.
The calling thread shall be suspended until one or more signals in set become pending or
until it is interrupted by an unblocked, caught signal, if no signal in set is pending at
the time of the call.
If the info argument is NULL, the sigwaitinfo ( ) function shall be equivalent to the sigwait( ) function.
If the something other than NULL is specified by the info argument, the sigwaitinfo ( ) function
shall be equivalent to sigwait( ), except that the selected signal
number shall be stored in the si_signo member.
If the something other than NULL is specified by the info argument, the sigwaitinfo ( ) function
shall be equivalent to sigwait( ), except that the cause of the signal shall be stored in the si_code member.
If the info argument is non-NULL, the selected signal's queued value - if any - shall be
stored in the si_value member of info, and shall be dequeued.
The pending indication for that signal shall be reset, if no further signals are queued for the selected signal.
Upon successful completion sigwaitinfo ( ) returns the selected signal number.