Quote Originally Posted by Mike View Post
Well you could use a computer resource like a socket - you suggested that already. Pick a range of e.g. 5 sockets that your app would try to open. maybe 40000...40004. When your app is starting it will try to open such a socket. If it fails it will open the next in that range. If no socket in that range is available then your app would not start. Maybe you even enhance the socket logic that way, that you can send a simple command to it and wait for a known response. If that response doesn't come, then you know it's not your app, but the app from somebody else...
Does this make sense?
If sockets is not what you want to use, you may create something else like a named message queue or pipe... or a kernel mutex etc... there are several solutions to this...
There are two problems : I don't have any experience of socket programming and I want a cross-platform solution.
Moreover I don't think I have enough time to search for that feature into the whole KDE sources and then port that Qt3 (and maybe KDE kernel)-dependent code to plain and portable Qt4.
You talked about "socket ranges", could you explain that to me alittle deeper? As I said I'm a noob in socket-programming...