KLockFile -- try harder
Nick Shaforostoff
shaforostoff at gmail.com
Tue Jan 27 22:00:48 GMT 2009
HI. I've figured out that KAutoSaveFile is terribly broken.
I fixed one easy bug, mailed author about another.
And now I've found out that KAutoSaveFile _believes_
KLockFile will work with pre-existing .lock files. but it don't:
int result = KDE_lstat( lockFileName, &st_buf );
if (result == 0)
{
return KLockFile::LockFail;
}
I believe it should open the file, check if the PID it contains is a
PID of a still running process.
Then, if kill(PID,0) returns -1 (error), then KLockFile::LockStale
value should be returned by KLockFile::lock().
Is the current behavior is the desired one, ot should I fix this?
More information about the kde-core-devel
mailing list