On 01/28/08 Jonathan Pryor wrote:
> > It is important (as in my initialy API sketch) that this function take
> > the signal_info and not the dignal number, as this implementation allows
> > only just an handler per signal in the API.
> 
> This has been corrected.  We now support up to 64 signal handlers within
> a process, and the same signal can be registered multiple times; each
> such registration gets a different index, and is thus independent.

Deregistration is handled incorrectly: if there are two handlers for the
same signal it gets disabled at the first uninstall.

> The only other major change is the addition of a
> UnixSignal.WaitAny(UnixSignal[]) method, which allows waiting on more
> than one handle (since WaitHandle.WaitAny() can't currently be used with
> WaitHandle subclasses like UnixSignal).

I suggest using params in the array argument.

> +int
> +Mono_Unix_UnixSignal_WaitAny (void** _signals, int count, int timeout /* 
> milliseconds */)
> +{
> +     fd_set read_fds;
> +     int mr, r;
> +     int max_fd = 0;
> +
> +     signal_info** signals = (signal_info**) _signals;
> +
> +     mr = pthread_mutex_lock (&signals_mutex);
> +     if (mr != 0) {
> +             errno = mr;
> +             return -1;

You don't unlock in the return path.
An extensive test program that shows this stuff works before being
committed would also help.
Thanks.

lupus

-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]                                     debian/rules
[EMAIL PROTECTED]                             Monkeys do it better
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to