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.
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to