ts <decoux / moulon.inra.fr> writes:

> >>>>> "V" == Ville Mattila <mulperi / iki.fi> writes:
> 
> V> But I want raise this issue again as I think that this really
> V> is a ruby bug.
> 
>  Apparently this is specific to Solaris.
> 
>  Can you try to protect all call to select(2) in eval.c against
>  ERESTART. For example, in rb_thread_select() something like this
> 
> 	for (;;) {
> 	    TRAP_BEG;
> 	    n = select(max, read, write, except, tvp);
> 	    TRAP_END;
> #ifdef ERESTART
> 	    if (n < 0 && (errno == EINTR || errno == ERESTART)) {
> #else
> 	    if (n < 0 && errno == EINTR) {
> #endif

        I did this modification to rb_thread_select and Invalid socket
        problem seems to be gone. Thank you very much! This
        fix is probably correct on Solaris, as for example solaris 8
        source code includes similar check in truss program.

 - Ville