On 14/02/2012 09:48, Antonio Fortuny wrote: >> System-wide solutions for Linux is the *Unix-way*, is to create a >> lock-file; > Got it. >> If you create one on a tmpfs mounted directory, > What do you call a "tmpfs mounted directory" ? I'm only a pascal > programmer not a system guy Usually in /tmp, or by examining the output of 'mount'.
>> it will all happen in memory, hence no hard-drive storage access >> will happen (unless moved to swap, but in your case it won't ever >> happen) so all you need to do is check for lock file existence. > Does it mean that every process will have to create the file ? An > open-close sequence checking the IOResult would be enough ? No, only the process that uses the resource, creates the file, that /i think/ should be enough, others only see if file exists. Also, for other examples of inter-process communication, you may want to read about DBUS maybe ? L. >> (IMHO) There is also futex (Fast Userspace muTEX) but I don't know >> much about that one; http://en.wikipedia.org/wiki/Futex >> >> HTH. L. >> >> -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
