From: ctm@... (Clifford T. Matthews) Date: 2006-09-29T14:25:05+09:00 Subject: Re: continuations across fork? >>>>> "K." == Keith Gaughan writes: K.> Ok, after reading the rest of your reply, I think I may have K.> misunderstood you. Could you give us a minimal fragment of K.> code to trigger this? It could be an OS-specific problem. This isn't necessarily the minimum, and it's obviously not anything useful and can be rewritten, but this will cause the error: #! /bin/env ruby $VERBOSE = true i = 0 class X def self.c @@c end def self.c=(val) @@c = val end end callcc do |z| d = z callcc do |cont| X.c = cont end d.call if i < 2 exit end i += 1 fork do puts "child" X.c.call end puts "parent" The entire toy server that actually uses my technique is about 100 lines, with comments. I don't mind posting it. -- Cliff Matthews +1 505 363 5754 Cell