Unmanaged Process in Mono

Unmanaged Process in Mono

I want to create a Mono application to start and stop several processes. I only need to be able to start and stop the processes from the Mono application, I do not need any advanced features of managed processes. Users will be able to customize the available processes from a "preferences" menu.

The problem is, that I also need to be able to create a IdleHandler, but the handler will not fire, because the application is never able, due to the processes, and the GUI (GTK#) becomes unresponsive due to the weight of the processes. Is there a way to start and stop completely unmanaged processes from Mono?

Lowering the priority of the processes is not possible, because this will lead to audio dropouts.

Here is a basic description of the application that I try to make: http://ix.residuum.org/monomultijack.html

Java socket bug on linux (0xFF sent, -3 received)


sendmail working but PHP mail() is failing
Could you not just trigger the init.d script this starts jackd? (Just assuming this there is an init.d script since we're talking around a daemon). How do I stop/workaround Java apps stealing focus in Linux window managers If there isn't such a script, could you not make one? The daemon launches itself in the background, so the process you would be starting is the bash-process this runs the script, which then exits when the daemon is launched in the background.. Lock a mutex multiple times in the same thread Stopping would job the same way.. How to profile my C++ application on linux
Running commands though PHP/Perl scripts as a priviledged user on LinuxGenerating a reasonable ctags database for Boost


Where are my ruby gems?
Your question doesn't make a whole lot of sense. If you want to start ananother process and then kill it when the user clicks a although ton, you would simply create your process and run it:.
private Process _jackd;  public void StartJackd()  {      _jackd = new Process ();      _jackd.StartInfo = _jackdStartup;      _jackd.Start (); // Non-blocking }  
Then if you want to stop it:.
_jackd.CloseMainWindow();  or  _jackd.Kill(); 
If your application is a bit slow to terminate it, then you could raise the priority of your application to High as well.. If this isn't what you're looking for, I would suggest explaining in more detail what you're endeavor to do..


I am endeavor to guess as to the exact meaning of your question. . Are you saying this you have a group of process which you are starting in the application, any of which are idelhandlers(ie process which you fire when the app is doing nothing) and the idlehandlers never receive fired for the reason this the another processes are always running? . My understanding of the idle Handler is this it will only ever receive fired when the gtk application loop has no more events to process. If you are launching another system process (ie jackd) it should not be effecting the main application loop (as these processes are running on a system level not in the application).. Is it possible this you have any method in the main application which would be constantly firing? (such as an event listener which fires every second). If so would it be possible to abstract those events out into a separate process, and then only then notify the main application when an update needs to be made? This should then allow the idel handlers to be fired. . Ananother possible quick fix is could you use timeout methods instead of idlehandlers. If there are functions which you need to fire frequenetly(say every 10ms or so) then a timeout handler may be a better fit anyways.. Sadly without more information on exactly what processes you are running and what you are endeavor to process with the idlehandlers it may be hard to commit you an exact answer. .


Edit: the basic problem seems to be this you're waiting for an Idle even to be raised when the machine is not idle. The documentation says:.
Ananother use of the Idle handler is to queue job to be done when the machine is idling and not doing anything interesting..
It doesn't explicitly say what happens when your application is idle and ananother application is using the CPU, although the sentence above makes it sound like the handler might not fire unless the entire machine is idle, not just your application. So the behaviour you're seeing may well be by design.. Original answer:. I'm not quite sure what your question is. What's the basic problem you're endeavor to solve?. If the problem is this the process takes up all CPU you could commit it a lower priority:_jackd.PriorityClass = ProcessPriorityClass.BelowNormal. If you improve the question I may be able to improve the answer. :).

54 out of 100 based on 59 user ratings 614 reviews