[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libruby1.8 breaks raggle?



hi again,

On Fri, Dec 17, 2004 at 12:10:39PM +0100, Mauricio Fernández wrote:
> On Fri, Dec 17, 2004 at 10:36:53AM +0100, Michael Ablassmeier wrote:
> > If rebuilding ruby1.8 (-2) without 101_cvs_updates.patch, raggle works nicely,
> > if the patch is applied it stops updating the feeds with:
> >     
> >  Feed Thread Reap Error: "temporal locking already locked string".
> [...]
> 
> I think it's caused by
> 
> Thu Nov  4 03:11:33 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>
> 
>         * string.c (str_gsub): lock strings temporarily.  [ruby-dev:24687]

no, io.c is the bad one. I removed the rb_str_locktmp(str); and
rb_str_unlocktmp(str); calls in io_write, now raggle works nicely.

see attached patch.

bye,
    - michael
--- ruby-1.8.2.orig/io.c	2004-12-17 14:44:26.000000000 +0100
+++ ruby-1.8.2/io.c	2004-12-17 14:44:38.000000000 +0100
@@ -462,9 +462,8 @@
     rb_io_check_writable(fptr);
     f = GetWriteFile(fptr);
 
-    rb_str_locktmp(str);
     n = rb_io_fwrite(RSTRING(str)->ptr, RSTRING(str)->len, f);
-    rb_str_unlocktmp(str);
+    
     if (n == -1L) rb_sys_fail(fptr->path);
     if (fptr->mode & FMODE_SYNC) {
 	io_fflush(f, fptr);

Reply to: