if (proc == IntPtr.Zero)
throw new ArgumentException ("Can't find process with ID " + processId.ToString ());
- return (new Process (new SafeProcessHandle (proc, false), processId));
+ /* The handle returned by GetProcess_internal is owned by its caller, so we must pass true to SafeProcessHandle */
+ return (new Process (new SafeProcessHandle (proc, true), processId));
}
public static Process[] GetProcessesByName(string processName, string machineName)
}
[Obsolete ("Process.Start is not supported on the current platform.", true)]
- public static Process Start(string fileName, string username, SecureString password, string domain)
+ public static Process Start(string fileName, string userName, SecureString password, string domain)
{
throw new PlatformNotSupportedException ("Process.Start is not supported on the current platform.");
}
[Obsolete ("Process.Start is not supported on the current platform.", true)]
- public static Process Start(string fileName, string arguments, string username, SecureString password, string domain)
+ public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain)
{
throw new PlatformNotSupportedException ("Process.Start is not supported on the current platform.");
}