Imported Upstream version 4.2.2.29

Former-commit-id: f069081cc0821095435a845c961ae61cbbc95121
This commit is contained in:
Xamarin Public Jenkins
2016-01-18 21:29:19 -05:00
parent 8cb7d04924
commit 3c6daee652
1830 changed files with 496 additions and 305641 deletions

View File

@@ -162,6 +162,8 @@ namespace System.IO {
class KqueueMonitor : IDisposable
{
static bool initialized;
public int Connection
{
get { return conn; }
@@ -171,6 +173,13 @@ namespace System.IO {
{
this.fsw = fsw;
this.conn = -1;
if (!initialized){
int t;
initialized = true;
var maxenv = Environment.GetEnvironmentVariable ("MONO_DARWIN_WATCHER_MAXFDS");
if (maxenv != null && Int32.TryParse (maxenv, out t))
maxFds = t;
}
}
public void Dispose ()
@@ -625,7 +634,7 @@ namespace System.IO {
const int F_GETPATH = 50;
const int __DARWIN_MAXPATHLEN = 1024;
static readonly kevent[] emptyEventList = new System.IO.kevent[0];
const int maxFds = 200;
int maxFds = Int32.MaxValue;
FileSystemWatcher fsw;
int conn;