[Mono-dev] To set process priority for Unix.

~ * ~ Srijith Unni ~ * ~ srijith.unni at gmail.com
Thu May 24 05:41:37 EDT 2007


Hi Everyone,

  This is my first mail to this list, and I am a new Mono Developer. I hope
to use this list to learn more about mono and C# on linux platforms.
  I would like to know how it is possible to change the priority of a
process running on Unix based platform, say SuSe Linux, using C# compiled on
Mono.
 I have tried using this following Code snippet,

           Process Simple = new Process();

          Simple.StartInfo.FileName   = "mono";
          Simple.StartInfo.Arguments = "/home/ksrijith/Simple.exe";

          Simple.Start();

          Console.WriteLine("Simple Running with priority {0}",
Simple.PriorityClass);
          Simple.PriorityClass = ProcessPriorityClass.BelowNormal;

   But the priority of the process does not change and is always "Normal".
Is there any kind of privileges i need to set for this to work on Unix. or
is there any way i can do this using Mono.Unix namespace. ?

   Please excuse me, if this has already been discussed in the list. I am a
newbie and didn`t know how to search the existing archives..!

Thanks & Regards,
--
A.Srijith.K.Unni

Mail ID : srijith.unni at gmail.com
Home Page : http://srijith.unni.googlepages.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070524/de5a3469/attachment.html 


More information about the Mono-devel-list mailing list