How to know that application is already running?
posted 11 years ago
You'd have to interogate the OS to find out what processes are running - which could be easily enough done on UNIX (ps -e | grep -e <whatever> or something) and less easily done with Windows/MacOS. You'll probably be able to access running process with some native code on Windows. But neither way is particularaly robust - you need to know that your process will have a unique name on the OS, which it might not. A better way perhaps would be to launch the process from a singleton - that way (assuming it starts) your app would know that it had already started the process.