// This should return Process[0] or a Process[] with all the "foo" programs running
Process.GetProcessesByName ("foo");
}
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public void HigherPrivilegeProcessName ()
+ {
+ if (!RunningOnUnix)
+ Assert.Ignore ("accessing pid 1, only available on unix");
+
+ string v = Process.GetProcessById (1).ProcessName;
+ }
}
}