On Fri, 31 Jan 2003 nobu.nokada / softhome.net wrote:

> In Solaris, it apparently needs to handle EINTR at every I/O
> operations.  Also fseek()?

i *think* this is actually the case for *any* system call on solaris - they
are not automatically restarted as in linux by default.  i've posted to
comp.lang.unix.programmer regarding this, but i seem to find more knowledge on
this list...

-a


>
>
> Index: file.c
> ===================================================================
> RCS file: /cvs/ruby/src/ruby/file.c,v
> retrieving revision 1.130
> diff -u -2 -p -r1.130 file.c
> --- file.c	29 Jan 2003 23:28:47 -0000	1.130
> +++ file.c	30 Jan 2003 22:21:47 -0000
> @@ -1990,4 +1990,5 @@ rb_file_flock(obj, operation)
>  	fflush(GetWriteFile(fptr));
>      }
> +  retry:
>      TRAP_BEG;
>      ret = flock(fileno(fptr->f), NUM2INT(operation));
> @@ -2001,4 +2002,9 @@ rb_file_flock(obj, operation)
>  #endif
>                return Qfalse;
> +	  case EINTR:
> +#if defined(ERESTART)
> +	  case ERESTART:
> +#endif
> +	    goto retry;
>          }
>  	rb_sys_fail(fptr->path);
>
>
>

-- 

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328
 | Email: ahoward / fsl.noaa.gov
 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================