Subversion Repositories public

Rev

Rev 100 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 100 Rev 108
Line 1... Line 1...
1
1
2
/// Application instance class implementation
2
/// Application instance class implementation
3
/**
3
/**
4
 * \file appinst.cpp
4
 * \file appinst.cpp
5
 *
5
 *
6
 * Copyright (C) 2007, 2008 Lukas Jelinek, <lukas@aiken.cz>
6
 * Copyright (C) 2007, 2008, 2012 Lukas Jelinek, <lukas@aiken.cz>
7
 *
7
 *
8
 * This program is free software; you can redistribute it and/or
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of one of the following licenses:
9
 * modify it under the terms of one of the following licenses:
10
 *
10
 *
11
 * \li 1. X11-style license (see LICENSE-X11)
11
 * \li 1. X11-style license (see LICENSE-X11)
Line 13... Line 13...
13
 * \li 3. GNU General Public License, version 2  (see LICENSE-GPL)
13
 * \li 3. GNU General Public License, version 2  (see LICENSE-GPL)
14
 *
14
 *
15
 * If you want to help with choosing the best license for you,
15
 * If you want to help with choosing the best license for you,
16
 * please visit http://www.gnu.org/licenses/license-list.html.
16
 * please visit http://www.gnu.org/licenses/license-list.html.
17
 *
17
 *
-
 
18
 * Credits:
-
 
19
 *   Christian Ruppert (new include to build with GCC 4.4+)
-
 
20
 *
18
 */
21
 */
19
 
22
 
20
23
21
#include <fcntl.h>
24
#include <fcntl.h>
22
#include <unistd.h>
25
#include <unistd.h>
23
#include <stdio.h>
-
 
24
#include <errno.h>
26
#include <errno.h>
25
#include <signal.h>
27
#include <signal.h>
-
 
28
#include <cstdio>
26
29
27
#include "appinst.h"
30
#include "appinst.h"
28
31
29
/// Lockfile permissions (currently 0644)
32
/// Lockfile permissions (currently 0644)
30
#define APPLOCK_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
33
#define APPLOCK_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)