On Tue, 28 Jan 2003, ts wrote:

> >>>>> "a" == ahoward  <ahoward / fsl.noaa.gov> writes:
>
> >> You need a #rewind after you have got a lock.
>               ^^^^^^^
>
>  Well, it was a #seek : sorry.
>
> a> huh?  you mean when writing C programs or also from within ruby?
>
>  also from ruby, if you open the file in update you must #seek to the end
>  after you have the lock

so, something like

  f.flock File::LOCK_EX
  f.seek f.size, IO::SEEK_END
  ...

is this even with

  f = File.open path, 'a+'

??

because i did _not_ do this in my program (see earlier post) and it worked...
should i have?


do you have any idea why one seems to need to trap SystemCallError (EINTR) on
solaris while making system calls from within forked threads but seem _not_ to
need to do so on linux?  the solaris behviour _kinda_ makes sense since you
could get SIGCLD, but it seems like this should not blow you process out of
kernel space... perhaps one could simply trap the signal to prevent this, but
then it would not be handled in the normal way...

-a

-- 

 ====================================
 | 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
 ====================================