PDA

View Full Version : C/GTK+ -- Running Program Check



Naveen Chandran
February 19th, 2008, 07:12 PM
In GTK+ How do I check if a particular program is running or not? If Not then start the program...

How do I do it? :confused:

pedro_orange
February 19th, 2008, 07:50 PM
I wouldn't know how to do it directly from the code in linux. In windows you can check a string against a list of running applications which is stored in an object. I'm sure there must be a similar solution.

You could do a long work-around that ran the ps -C "appname" shell command and see if it returned any information.


string = system("ps -C appname")

I'm sure there would be a better method though.