You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@@ -40,7 +40,13 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
[ResourceConsumption(ResourceScope.Machine)]
|
||||
override protected bool ReleaseHandle()
|
||||
{
|
||||
#if MONO
|
||||
System.IO.MonoIOError error;
|
||||
System.IO.MonoIO.Close (handle, out error);
|
||||
return error == System.IO.MonoIOError.ERROR_SUCCESS;
|
||||
#else
|
||||
return Win32Native.CloseHandle(handle);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// Implements Microsoft.Win32.SafeHandles.SafeRegistryHandle
|
||||
//
|
||||
// ======================================================================================
|
||||
#if !FEATURE_PAL
|
||||
#if !FEATURE_PAL || MONO
|
||||
namespace Microsoft.Win32.SafeHandles {
|
||||
using System;
|
||||
using System.Security;
|
||||
|
||||
@@ -60,6 +60,10 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
[ResourceConsumption(ResourceScope.Machine)]
|
||||
override protected bool ReleaseHandle()
|
||||
{
|
||||
#if MONO
|
||||
NativeEventCalls.CloseEvent_internal (handle);
|
||||
return true;
|
||||
#else
|
||||
#if !FEATURE_CORECLR
|
||||
if (!bIsMutex || Environment.HasShutdownStarted)
|
||||
return Win32Native.CloseHandle(handle);
|
||||
@@ -82,6 +86,7 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
return bReturn;
|
||||
#else
|
||||
return Win32Native.CloseHandle(handle);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user