Vikram Ranade <[EMAIL PROTECTED]> writes:

> 
> Umm....Lock files??? any chance that you could elaborate on that? 
> Thanks!
> Vikram 
> 
[...]

Hi Vikram,
  By that, Kapil meant using zero sized files as locks, implemented as:

 When ever the program starts
 . look for a particular file (say one.lock) in a particular location (say /tmp)
 . if it exists, it implies the software is already in use
 . if it doesn't, implies this is the first instance
     . create the predefined lock file (0 bytes) at the predefined location
 . while exiting the program, remove this lock file.

So, in effect, the existance of the file implies whether the software is in use
or not and you can take a decision based on that (may be abort loading another
instance)

HTH
-js


_______________________________________________
ilugd mailinglist -- [EMAIL PROTECTED]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to