summaryrefslogtreecommitdiffstats
path: root/tsak
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-02-17 12:01:31 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-02-17 12:01:31 +0100
commit5914fa0499862d7c7990c4b0426aa79acdfcc770 (patch)
tree89cb5c0fe6dde6b06d0d7889978be85744e07219 /tsak
parent216859a88384433a2628540914ebb30a3dadc0f7 (diff)
downloadtdebase-5914fa0499862d7c7990c4b0426aa79acdfcc770.tar.gz
tdebase-5914fa0499862d7c7990c4b0426aa79acdfcc770.zip
Fix unintended rename of LOCKFILE
Diffstat (limited to 'tsak')
-rw-r--r--tsak/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tsak/main.cpp b/tsak/main.cpp
index 7bc2b8d6a..652466852 100644
--- a/tsak/main.cpp
+++ b/tsak/main.cpp
@@ -45,7 +45,7 @@ using namespace std;
#define FIFO_DIR "/tmp/tdesocket-global"
#define FIFO_FILE_OUT "/tmp/tdesocket-global/tsak"
-#define FIFO_LOCTDEFILE_OUT "/tmp/tdesocket-global/tsak.lock"
+#define FIFO_LOCKFILE_OUT "/tmp/tdesocket-global/tsak.lock"
// WARNING
// MAX_KEYBOARDS must be greater than or equal to MAX_INPUT_NODE
@@ -266,7 +266,7 @@ void tearDownPipe()
void tearDownLockingPipe()
{
close(mPipe_lockfd_out);
- unlink(FIFO_LOCTDEFILE_OUT);
+ unlink(FIFO_LOCKFILE_OUT);
}
bool setFileLock(int fd, bool close_on_failure)
@@ -296,7 +296,7 @@ bool checkFileLock()
fl.l_whence = SEEK_SET;
fl.l_len = 0;
- int fd = open(FIFO_LOCTDEFILE_OUT, O_RDWR | O_NONBLOCK);
+ int fd = open(FIFO_LOCKFILE_OUT, O_RDWR | O_NONBLOCK);
fcntl(fd, F_GETLK, &fl); /* Overwrites lock structure with preventors. */
if (fd > -1) {
@@ -333,10 +333,10 @@ bool setupLockingPipe(bool writepid)
umask(0);
mkdir(FIFO_DIR,0644);
- mknod(FIFO_LOCTDEFILE_OUT, 0600, 0);
- chmod(FIFO_LOCTDEFILE_OUT, 0600);
+ mknod(FIFO_LOCKFILE_OUT, 0600, 0);
+ chmod(FIFO_LOCKFILE_OUT, 0600);
- mPipe_lockfd_out = open(FIFO_LOCTDEFILE_OUT, O_RDWR | O_NONBLOCK);
+ mPipe_lockfd_out = open(FIFO_LOCKFILE_OUT, O_RDWR | O_NONBLOCK);
if (mPipe_lockfd_out > -1) {
if (writepid) {
// Write my PID to the file