summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-10-04 10:08:47 +0000
committerJohn McCrae <john.mccrae@progress.com>2022-10-04 10:08:47 +0000
commitc0964e5361b0748d832de1eae7e31f597d956f6b (patch)
treeb500e4ee130ee3a173ee9610549aa48e5e4faf5f
parent1c0878bcc5bf128ddc01d0264f794111eae102e4 (diff)
downloadchef-c0964e5361b0748d832de1eae7e31f597d956f6b.tar.gz
adding the code to bypass the Handle close for server 2012
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r--cspell.json1
-rw-r--r--lib/chef/win32/handle.rb2
-rw-r--r--spec/unit/file_content_management/deploy/mv_unix_spec.rb4
3 files changed, 4 insertions, 3 deletions
diff --git a/cspell.json b/cspell.json
index 3bbdfbc5e1..2af017c060 100644
--- a/cspell.json
+++ b/cspell.json
@@ -886,6 +886,7 @@
"ONPARENT",
"onparent",
"onstart",
+ "operatingsystem",
"OPLOCK",
"optarg",
"optind",
diff --git a/lib/chef/win32/handle.rb b/lib/chef/win32/handle.rb
index 62623884ce..6364c13118 100644
--- a/lib/chef/win32/handle.rb
+++ b/lib/chef/win32/handle.rb
@@ -29,7 +29,7 @@ class Chef
extend Chef::ReservedNames::Win32::API::Process
include ChefPowerShell::ChefPowerShellModule::PowerShellExec
-
+
# See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683179(v=vs.85).aspx
# The handle value returned by the GetCurrentProcess function is the pseudo handle (HANDLE)-1 (which is 0xFFFFFFFF)
CURRENT_PROCESS_HANDLE = 4294967295
diff --git a/spec/unit/file_content_management/deploy/mv_unix_spec.rb b/spec/unit/file_content_management/deploy/mv_unix_spec.rb
index cdee52fe8f..53c3e6fbab 100644
--- a/spec/unit/file_content_management/deploy/mv_unix_spec.rb
+++ b/spec/unit/file_content_management/deploy/mv_unix_spec.rb
@@ -107,8 +107,8 @@ describe Chef::FileContentManagement::Deploy::MvUnix do
File.chmod(04755, target_file.path)
content_deployer.deploy(staging_file.path, target_file.path)
expect(::File.stat(target_file.path).mode & 07777).to eql(04755)
- staging_file.close!
- target_file.close!
+ staging_file.close
+ target_file.close
end
end
end