Imported Upstream version 5.18.0.205

Former-commit-id: 7f59f7e792705db773f1caecdaa823092f4e2927
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-16 08:20:38 +00:00
parent 5cd5df71cc
commit 8e12397d70
28486 changed files with 3867013 additions and 66 deletions

View File

@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.18.0.200";
public const string MonoVersion = "5.18.0.205";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -690,29 +690,19 @@ namespace System.Diagnostics
var procInfo = new ProcInfo ();
if (startInfo.HaveEnvVars) {
List<string> envVariables = null;
StringBuilder sb = null;
List<string> envVariables = new List<string> ();
foreach (DictionaryEntry de in startInfo.EnvironmentVariables) {
if (de.Value == null)
continue;
if (envVariables == null)
envVariables = new List<string> ();
if (sb == null)
sb = new StringBuilder ();
else
sb.Clear ();
sb.Append ((string) de.Key);
sb.Append ('=');
sb.Append ((string) de.Value);
envVariables.Add (sb.ToString ());
envVariables.Add (string.Concat (
(string) de.Key,
"=",
(string) de.Value));
}
procInfo.envVariables = envVariables?.ToArray ();
procInfo.envVariables = envVariables.ToArray ();
}
MonoIOError error;

View File

@ -732,6 +732,53 @@ namespace MonoTests.System.Diagnostics
public int bytesRead = -1;
[Test]
[NUnit.Framework.Category ("MobileNotWorking")]
public void TestEnvironmentVariablesClearedDoNotInherit ()
{
if (!RunningOnUnix)
Assert.Ignore ("env not available on Windows");
var stdout = new StringBuilder ();
Process p = new Process ();
p.StartInfo = new ProcessStartInfo ("/usr/bin/env");
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.OutputDataReceived += (s, e) => { if (e.Data != null) stdout.AppendLine (e.Data); };
p.StartInfo.Environment.Clear (); // i.e. don't inherit
p.StartInfo.Environment["HELLO"] = "123";
p.Start ();
p.BeginOutputReadLine ();
p.WaitForExit ();
Assert.AreEqual ("HELLO=123\n", stdout.ToString ());
}
[Test]
[NUnit.Framework.Category ("MobileNotWorking")]
public void TestEnvironmentVariablesClearedDoNotInheritEmpty ()
{
if (!RunningOnUnix)
Assert.Ignore ("env not available on Windows");
var stdout = new StringBuilder ();
Process p = new Process ();
p.StartInfo = new ProcessStartInfo ("/usr/bin/env");
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.OutputDataReceived += (s, e) => { if (e.Data != null) stdout.AppendLine (e.Data); };
p.StartInfo.Environment.Clear (); // i.e. don't inherit
p.Start ();
p.BeginOutputReadLine ();
p.WaitForExit ();
Assert.AreEqual ("", stdout.ToString ());
}
[Test]
[NUnit.Framework.Category ("MobileNotWorking")]
// This was for bug #459450

View File

@ -1 +1 @@
bc9455fc4548025ad6b04132fe603be994881bf5
62ab8613ecb3c15ea5415ef61bd457fb4b1dff1f

View File

@ -1 +1 @@
af59ae54387248745eca273c902da7d5c6ac89b3
c301ea9c51ef973583275ede7f0929a32d66f8d0

View File

@ -1 +1 @@
f88b88d951436b1e14bed4dcb22cfe4db6e2442b
4341329f749fc78f156781f5b69805c0c11c82b6

View File

@ -1 +1 @@
cbd9be16315bc40b8db406a77350bfe852e7b7bf
5deac025e62287fd30437992158be8bf4ef8719e

View File

@ -1 +1 @@
b1bc4d43ea4ede8b853e03b765143c78266363be
d628ff3e3bfcff58c5e733ff0bca66cc8e32ce6d

View File

@ -1 +1 @@
f2d0eb19c7e8ee9d66326772b513b293aa5b7b16
4b0c2992c734491de65ff79d23ecc6b961c42609

View File

@ -1 +1 @@
92053bb2a1f1686d30cfc60c050ca7e342d2794d
60309276e704fbc9b3dd9c39daf0385e444bea59

View File

@ -1 +1 @@
a082b9b028531e4197a6c2cb943bc48f36ec63e9
c6280d106763efb2489dc0e78396209db3c20ff1

View File

@ -1 +1 @@
bc9455fc4548025ad6b04132fe603be994881bf5
62ab8613ecb3c15ea5415ef61bd457fb4b1dff1f

View File

@ -1 +1 @@
af59ae54387248745eca273c902da7d5c6ac89b3
c301ea9c51ef973583275ede7f0929a32d66f8d0

View File

@ -1 +1 @@
f88b88d951436b1e14bed4dcb22cfe4db6e2442b
4341329f749fc78f156781f5b69805c0c11c82b6

View File

@ -1 +1 @@
cbd9be16315bc40b8db406a77350bfe852e7b7bf
5deac025e62287fd30437992158be8bf4ef8719e

View File

@ -1 +1 @@
b1bc4d43ea4ede8b853e03b765143c78266363be
d628ff3e3bfcff58c5e733ff0bca66cc8e32ce6d

View File

@ -1 +1 @@
f2d0eb19c7e8ee9d66326772b513b293aa5b7b16
4b0c2992c734491de65ff79d23ecc6b961c42609

View File

@ -1 +1 @@
92053bb2a1f1686d30cfc60c050ca7e342d2794d
60309276e704fbc9b3dd9c39daf0385e444bea59

Some files were not shown because too many files have changed in this diff Show More