this is still better than checking for a .swp file. some editor never uses any .swp files and doesn't even know the fact that another editor is opened and is editing the same file at the same time.
what he can do is change: next unless $p->cmndline =~ /vi.*tmp\.pl/; the above line to include some of the more commonly used editors. david Wiggins D'Anconia wrote: > This is an interesting proposed solution. But as the poster pointed out > depends on whether they are *only* using vi, if that can be assured then > you might consider using the method by which vi does its own checking on > its own files. In other words check for a ".<filename>.swp" or maybe a > ".<filename>.sw*" file in the directory where your file exists, if that > file exists then the file is open in someone's vi session. > > The real question is whether "vi" uses this swap file or whether that is > a "vim" convention (which is most likely what vi is on any recent linux > distro) but I don't have access to a box with "vi" while here at home, > only "vim". > > Again this doesn't help in cases of another editor being used....... > > http://danconia.org > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]