[Mono-dev] starting process in Linux environment
pattex007
bmwfreak007 at hotmail.com
Tue Feb 21 12:36:59 UTC 2012
Hi
i'm trying to start a proces in linux but it fails.
the problem is the process argument, it doesnt recognize it.
Process procNetAdapters = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo("ifconfig");
startInfo.Arguments = "| grep 'inet addr:'";
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.CreateNoWindow = true;
procNetAdapters.StartInfo = startInfo;
procNetAdapters.Start();
using (StreamReader r = procNetAdapters.StandardOutput)
{
string line;
string removedLine;
while ((line = r.ReadLine()) != null)
{
if (!windowList.Contains("ADAPTER: " + line))
{
windowList.Add("ADAPTER: " + line);
}
}
}
procNetAdapters.Close();
}
--
View this message in context: http://mono.1490590.n4.nabble.com/starting-process-in-Linux-environment-tp4406870p4406870.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list