Forum: JRuby Process exitstatus code is not 0

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6695342b0bee06015e6788ec728e1d39?d=identicon&s=25 Xiao Li (xli)
on 2008-11-04 16:47
(Received via mailing list)
Hi, got the following different between jruby1.1.5 and cruby1.8.6 on Mac
10.5.5 :

xli:~$ jruby -J-Djruby.fork.enabled=true -S irb
WARNING: fork is highly unlikely to be safe or stable on the JVM. Have
fun!
irb(main):015:0> Process.fork{};Process.waitall
=> [[11452, #<Process::Status: pid=????,exited(5)>]]
irb(main):016:0> $?
=> #<Process::Status: pid=????,exited(5)>
irb(main):017:0> $?.exitstatus
=> 5

----------------------------------------------

Ruby 1.8.6:
xli:~$ irb
>> Process.fork{};Process.waitall
=> [[11497, #<Process::Status: pid=11497,exited(0)>]]
>> $?.exitstatus
=> 0
>>

--------------------------------------------------

I couldn't find bug/issue at http://jira.codehaus.org/browse/JRUBY,
Is it a bug?

--
Cheers,

Li Xiao
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2008-11-04 19:30
(Received via mailing list)
Xiao Li wrote:
> => 5
>
> --------------------------------------------------
>
> I couldn't find bug/issue at http://jira.codehaus.org/browse/JRUBY,
> Is it a bug?

Appears to be. Feel free to file a bug, though as mentioned in the
warning "fork" is not expected to work correctly (it doesn't fork all
threads in the JVM so it's unlikely the new process will function well).

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.