You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -51,6 +51,8 @@ namespace System.IO
|
||||
public static readonly IntPtr
|
||||
InvalidHandle = (IntPtr)(-1L);
|
||||
|
||||
static bool dump_handles = Environment.GetEnvironmentVariable ("MONO_DUMP_HANDLES_ON_ERROR_TOO_MANY_OPEN_FILES") != null;
|
||||
|
||||
// error methods
|
||||
public static Exception GetException (MonoIOError error)
|
||||
{
|
||||
@@ -89,6 +91,8 @@ namespace System.IO
|
||||
return new FileNotFoundException (message, path);
|
||||
|
||||
case MonoIOError.ERROR_TOO_MANY_OPEN_FILES:
|
||||
if (dump_handles)
|
||||
DumpHandles ();
|
||||
return new IOException ("Too many open files", unchecked((int)0x80070000) | (int)error);
|
||||
|
||||
case MonoIOError.ERROR_PATH_NOT_FOUND:
|
||||
@@ -572,11 +576,11 @@ namespace System.IO
|
||||
// pipe handles
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
public extern static bool CreatePipe (out IntPtr read_handle, out IntPtr write_handle);
|
||||
public extern static bool CreatePipe (out IntPtr read_handle, out IntPtr write_handle, out MonoIOError error);
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
public extern static bool DuplicateHandle (IntPtr source_process_handle, IntPtr source_handle,
|
||||
IntPtr target_process_handle, out IntPtr target_handle, int access, int inherit, int options);
|
||||
IntPtr target_process_handle, out IntPtr target_handle, int access, int inherit, int options, out MonoIOError error);
|
||||
|
||||
// path characters
|
||||
|
||||
@@ -601,7 +605,7 @@ namespace System.IO
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
public extern static int GetTempPath(out string path);
|
||||
extern static void DumpHandles ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user