[Gambas-devel] Question about singleton class
Benoît Minisini
gambas at ...1...
Wed Sep 10 22:07:00 CEST 2014
Le 10/09/2014 21:40, John Leake a écrit :
>>
>> This is exactly what a file lock can do. I'm already doing that in the
>> big application I'm making for my job.
>>
> Thank you. A sha1 is probably overkill since I can at least get the
> process name/command line from the PID.
>
> The reason for this requirement is to prevent deadlock in the event that
> the originator of the lock has died or exited without calling UNLOCK.
>
Locks are automatically freed if the program ends or crash. This is a
system thing. Read the man page of the lockf() function if you want the
details.
--
Benoît Minisini
More information about the Devel
mailing list