[MacRuby-devel] [MacRuby] #216: fork subprocess exiting (normally) segfaults

MacRuby ruby-noreply at macosforge.org
Mon Jan 26 06:12:34 PST 2009


#216: fork subprocess exiting (normally) segfaults
-------------------------------+--------------------------------------------
 Reporter:  celtic@…           |       Owner:  lsansonetti@…        
     Type:  defect             |      Status:  new                  
 Priority:  major              |   Milestone:                       
Component:  MacRuby            |    Keywords:  fork process         
-------------------------------+--------------------------------------------
 When '''fork''''s subprocess dies, it segfaults about 80% of the time (out
 of a sample of 10 runs):
 {{{
 echo "fork {}" | macruby
 }}}
 Calling the non-block version alone like this seems to segfault less
 often, perhaps 50% of the time:
 {{{
 echo fork | macruby
 }}}

 Note that it's only the subprocess that segfaults, and not the main
 process. This can be demonstrated:
 {{{
 fork { }
 sleep 1
 puts "soup"
 }}}
 This produces the segfault output, followed by 'soup' a moment later.

 Strangely, sleeping after the non-block call causes things to work:
 {{{
 fork
 sleep 1
 }}}
 (no segfault with the above code)

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/216>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list