[Interest] Detecting if the application is already running from another user account
André Somers
andre at familiesomers.nl
Fri Jun 3 15:23:11 CEST 2016
Op 03/06/2016 om 15:08 schreef Thiago Macieira:
> On sexta-feira, 3 de junho de 2016 11:40:31 BRT Etienne Sandré-Chardonnal
> wrote:
>> Hi,
>>
>> I would like to detect if my application is already running from another
>> user account and warn the user.
> Create a file in a public place (like /tmp) that indicates it's running. You
> can use a QLockFile, provided the other side always uses tryLock() and never
> lock().
>
Be careful with that. Windows tends to mess with you here, applying the
same kinds of tricks they introduced for the registry long ago to the
file system now too.
André
More information about the Interest
mailing list