Skip to content

Instantly share code, notes, and snippets.

@irohiroki
Created March 19, 2011 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irohiroki/877470 to your computer and use it in GitHub Desktop.
Save irohiroki/877470 to your computer and use it in GitHub Desktop.
diff --git a/lib/guard/spork/fake_spawn.rb b/lib/guard/spork/fake_spawn.rb
new file mode 100644
index 0000000..8551778
--- /dev/null
+++ b/lib/guard/spork/fake_spawn.rb
@@ -0,0 +1,7 @@
+module FakeSpawn
+ if RUBY_VERSION < '1.9'
+ def spawn(cmd)
+ system(cmd + ' >/dev/null 2>&1 < /dev/null &')
+ end
+ end
+end
diff --git a/lib/guard/spork/runner.rb b/lib/guard/spork/runner.rb
index 51a32e9..2c51a20 100644
--- a/lib/guard/spork/runner.rb
+++ b/lib/guard/spork/runner.rb
@@ -1,8 +1,10 @@
require 'socket'
+require 'guard/spork/fake_spawn'
module Guard
class Spork
class Runner
+ include FakeSpawn
attr_accessor :options
def initialize(options = {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment