For portability, I use boost::interprocess::file_lock::try_lock() upon some 
existing common file.
(if it fails, program is already running so you can either exit or send to the 
other process program arguments or so...)
Some parts of boost libraries are nice, some are ugly and bloated as hell... 
Interprocess is OK(ish).
R.

On 16/02/2013 13:10, Gonzalo Garramuno wrote:
> I would like my application to have only one instance of it running at a 
> time.  However I am unsure how to implement this.
> If the user opens another instance the contents of what it opened should go 
> to the already opened instance.
> As an example, I would put emacs.
> 
> How would I go about coding this?  Pipes?  Sockets?  None of the above.
> 

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to