C++/Qt4 Interprocess communications
I've designed a program that is started with a command line argument "./myprog 1".
I would like to have more than 1 instance running but no new instance can have the same
argument as an already running instance.
ie. If "./myProg 1" is running, I'm not allowed to start a new "./myProg 1" but I would be
allowed to start "./myProg 2" or "./myProg 3", so I need some way of finding out which
instances with their arguments are already running.
My first thought was to write to a file that all instances of the program could read and write
to check each others status, but with people using SD cards, I would like to keep writes to a
minimum. I came across the shared memory option, but for me is fairly heavy going, although
with examples on the InterWeb I should be able to get it working.
Perhaps some forum readers could suggest other/easier ways to achieve this.