Created
October 27, 2010 15:40
-
-
Save voxik/649285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From dba0f7e2b6f99d292f47cd3cb6fc8e12b8225491 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <[email protected]> | |
Date: Wed, 27 Oct 2010 17:39:26 +0200 | |
Subject: [PATCH] Bring spoon alive. | |
--- | |
lib/redcar.rb | 2 +- | |
lib/redcar/runner.rb | 4 ++-- | |
2 files changed, 3 insertions(+), 3 deletions(-) | |
diff --git a/lib/redcar.rb b/lib/redcar.rb | |
index e4fc818..81b871e 100644 | |
--- a/lib/redcar.rb | |
+++ b/lib/redcar.rb | |
@@ -14,7 +14,7 @@ require 'forwardable' | |
require 'uri' | |
begin | |
- if Config::CONFIG["RUBY_INSTALL_NAME"] == "jruby" | |
+ unless respond_to? :fork | |
require 'spoon' | |
module Redcar; SPOON_AVAILABLE = true; end | |
else | |
diff --git a/lib/redcar/runner.rb b/lib/redcar/runner.rb | |
index c3eafb7..b249149 100644 | |
--- a/lib/redcar/runner.rb | |
+++ b/lib/redcar/runner.rb | |
@@ -7,7 +7,7 @@ module Redcar | |
jruby = Config::CONFIG["RUBY_INSTALL_NAME"] == "jruby" | |
osx = (not [:linux, :windows].include?(Redcar.platform)) | |
begin | |
- if forking and not jruby | |
+ if forking and respond_to? :fork | |
# jRuby doesn't support fork() because of the runtime stuff... | |
forking = false | |
puts 'Forking failed, attempting to start anyway...' if (pid = fork) == -1 | |
@@ -25,7 +25,7 @@ module Redcar | |
forking = false | |
construct_command do |command| | |
command.push('--silent') | |
- ::Spoon.spawnp(*command) | |
+ ::Spoon.spawn(*command) | |
end | |
exit 0 | |
elsif forking | |
-- | |
1.7.2.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment