KDECore
klockfile_unix.cpp
Go to the documentation of this file.
57// * lockfile-create, from the lockfile-progs package, uses the link() trick from lockFileWithLink
61// Note about flock: don't unlink, it creates a race. http://world.std.com/~swmcd/steven/tech/flock.html
bool getLockInfo(int &pid, QString &hostname, QString &appname)
Returns the pid, hostname and appname of the process holding the lock after the lock functon has retu...
Definition klockfile_unix.cpp:502
@ LockFail
The lock could not be acquired because it is held by another process.
Definition klockfile.h:60
void setStaleTime(int _staleTime)
Set the time in seconds after which a lock is considered stale.
Definition klockfile_unix.cpp:136
KLockFile(const QString &file, const KComponentData &componentName=KGlobal::mainComponent())
Definition klockfile_unix.cpp:116
LockResult lock(LockFlags flags=LockFlags())
Attempt to acquire the lock.
Definition klockfile_unix.cpp:386
int staleTime() const
Return the time in seconds after which a lock is considered stale The default is 30.
Definition klockfile_unix.cpp:129
@ NoBlockFlag
Return immediately, do not wait for the lock to become available.
Definition klockfile.h:77
@ ForceFlag
Automatically remove a lock when a lock is detected that is stale for more than staleTime() seconds,...
Definition klockfile.h:84
A QTemporaryFile that will save in the KDE temp directory.
Definition ktemporaryfile.h:93
Definition kaboutdata.h:33
static bool operator!=(const KDE_struct_stat &st_buf1, const KDE_struct_stat &st_buf2)
Definition klockfile_unix.cpp:150
static bool testLinkCountSupport(const QByteArray &fileName)
Definition klockfile_unix.cpp:156
#define FIELD_EQ(what)
static bool operator==(const KDE_struct_stat &st_buf1, const KDE_struct_stat &st_buf2)
Definition klockfile_unix.cpp:141
Type fileSystemType(const QString &path)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Jul 20 2023 00:00:00 by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Jul 20 2023 00:00:00 by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.