Bug #2097

fork NotImplementedError on FreeBSD

Added by Robert Gleeson almost 6 years ago. Updated almost 4 years ago.

[ruby-core:25564]
Status:Third Party's Issue
Priority:Normal
Assignee:-
ruby -v:ruby 1.9.1p129 (2009-05-12 revision 23412) [x86_64-freebsd7.1] Backport:

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


Related issues

Related to Ruby trunk - Bug #270: lazy timer thraed creation Closed

History

#1 Updated by Nobuyoshi Nakada almost 6 years ago

=begin
Hi,

At Mon, 14 Sep 2009 14:16:11 +0900,
robert gleeson wrote in :

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

#2 Updated by Nobuyoshi Nakada almost 6 years ago

  • Status changed from Open to Third Party's Issue

=begin

=end

#3 Updated by Yui NARUSE almost 6 years ago

=begin
use Process.spawn.
=end

#4 Updated by Robert Gleeson almost 6 years ago

=begin
Hi,

Thanks for reply. It seems this issue is resolved on FreeBSD 7.2 for anyone who stumbles upon this :-)
=end

#5 Updated by Yui NARUSE almost 6 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

#6 Updated by Yui NARUSE almost 6 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

#7 Updated by Borys Kuzikov almost 4 years ago

Hey, anybody! Hack this bug!

#8 Updated by Yui NARUSE almost 4 years ago

Borys Kuzikov wrote:

Hey, anybody! Hack this bug!

Use 7.2 or later.

Also available in: Atom PDF