Bug #2097
closedfork NotImplementedError on FreeBSD
Description
=begin
Hi,
I'm not sure if a fix should be applied via patches to the FreeBSD port of ruby or in ruby itself, but on Ruby 1.9.1(patchlevel 129) you cannot fork a process.
irb(main):002:0> Process.fork
NotImplementedError: fork() function is unimplemented on this machine
from (irb):2:in fork' from (irb):2 from /opt/ruby19/bin/irb19:12:in '
I love ruby, and I love FreeBSD. It'd be great if i can combine both. Thanks!
=end
        
           Updated by nobu (Nobuyoshi Nakada) about 16 years ago
          Updated by nobu (Nobuyoshi Nakada) about 16 years ago
          
          
        
        
      
      =begin
Hi,
At Mon, 14 Sep 2009 14:16:11 +0900,
robert gleeson wrote in [ruby-core:25564]:
I'm not sure if a fix should be applied via patches to the
FreeBSD port of ruby or in ruby itself, but on Ruby
1.9.1(patchlevel 129) you cannot fork a process.
On recent *BSD, fork can't work with pthreads, and pthreads is
mandatory to ruby 1.9.  This is caused by the kernel internal.
See http://www.freebsd.org/cgi/query-pr.cgi?pr=threads/101323.
I love ruby, and I love FreeBSD. It'd be great if i can
combine both. Thanks!
Persuade the BSD maintainers.
--
Nobu Nakada
=end
        
           Updated by nobu (Nobuyoshi Nakada) about 16 years ago
          Updated by nobu (Nobuyoshi Nakada) about 16 years ago
          
          
        
        
      
      - Status changed from Open to Third Party's Issue
=begin
=end
        
           Updated by naruse (Yui NARUSE) about 16 years ago
          Updated by naruse (Yui NARUSE) about 16 years ago
          
          
        
        
      
      =begin
use Process.spawn.
=end
        
           Updated by robertgleeson (Robert Gleeson) about 16 years ago
          Updated by robertgleeson (Robert Gleeson) about 16 years ago
          
          
        
        
      
      =begin
Hi,
Thanks for reply. It seems this issue is resolved on FreeBSD 7.2 for anyone who stumbles upon this :-)
=end
        
           Updated by naruse (Yui NARUSE) about 16 years ago
          Updated by naruse (Yui NARUSE) about 16 years ago
          
          
        
        
      
      =begin
On Ruby 1.9.1 and FreeBSD7.2 fork doesn't work.
But on ruby 1.9.2dev (2009-09-16 trunk 24965) [x86_64-freebsd7.2], fork works.
I don't know why.
=end
        
           Updated by naruse (Yui NARUSE) about 16 years ago
          Updated by naruse (Yui NARUSE) about 16 years ago
          
          
        
        
      
      =begin
Just information for someone see this,
FreeBSD 7.2 can fork when pthreads doesn't run.
So in trunk, stop timer thread then fork and restart timer.
=end
        
           Updated by Potapuff (Borys Kuzikov) almost 14 years ago
          Updated by Potapuff (Borys Kuzikov) almost 14 years ago
          
          
        
        
      
      Hey, anybody! Hack this bug!
        
           Updated by naruse (Yui NARUSE) almost 14 years ago
          Updated by naruse (Yui NARUSE) almost 14 years ago
          
          
        
        
      
      Borys Kuzikov wrote:
Hey, anybody! Hack this bug!
Use 7.2 or later.