diff options
author | Serdar Sutay <serdar@opscode.com> | 2013-11-21 15:03:56 -0800 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2013-11-21 15:03:56 -0800 |
commit | d1d11bdea84019cdc150a5582d9113007dca38fe (patch) | |
tree | 0373c16298144f47bfddaa7d88860d969c049a9f | |
parent | 5cae63bf8b9de07dd8c08d7e2b0876e2ed5b86e2 (diff) | |
download | chef-d1d11bdea84019cdc150a5582d9113007dca38fe.tar.gz |
Make the :fork check on windows more reliable.
-rw-r--r-- | chef/lib/chef/client.rb | 2 | ||||
-rw-r--r-- | chef/spec/unit/client_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chef/lib/chef/client.rb b/chef/lib/chef/client.rb index 7723ae9c57..e1b5246d1e 100644 --- a/chef/lib/chef/client.rb +++ b/chef/lib/chef/client.rb @@ -160,7 +160,7 @@ class Chef # === Returns # boolean:: Return value from #do_run. Should always returns true. def run - if(Chef::Config[:client_fork] && Process.respond_to?(:fork)) + if(Chef::Config[:client_fork] && Process.respond_to?(:fork) && !Chef::Platform.windows?) Chef::Log.info "Forking chef instance to converge..." pid = fork do Chef::Log.info "Forked instance now converging" diff --git a/chef/spec/unit/client_spec.rb b/chef/spec/unit/client_spec.rb index 6433808917..9497865c73 100644 --- a/chef/spec/unit/client_spec.rb +++ b/chef/spec/unit/client_spec.rb @@ -128,7 +128,7 @@ shared_examples_for Chef::Client do @client.should_receive(:run_started) @client.should_receive(:run_completed_successfully) - if(Chef::Config[:client_fork]) + if(Chef::Config[:client_fork] && !windows?) require 'stringio' if(Chef::Config[:pipe_node]) pipe_sim = StringIO.new |