The Assimilation Monitoring Project
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
misc.h
Go to the documentation of this file.
1
24
#ifndef _MISC_H
25
#include <
projectcommon.h
>
26
#include <
configcontext.h
>
27
#ifndef WIN32
28
#include <syslog.h>
29
#endif
30
#include <stdio.h>
31
32
#define STD_PID_DIR "/var/run"
33
34
extern
const
char
*
assim_syslogid
;
35
37
typedef
enum
{
38
PID_NOTRUNNING
,
//< Nothing seems to be running for this pidfile
39
PID_DEAD
,
//< The pid file exists, but its process doesn't
40
PID_NOTUS
,
//< Something is running, but we don't think it's one of us
41
PID_RUNNING
,
//< The pid file exists, and looks like one of us
42
}
PidRunningStat
;
43
char
*
proj_get_sysname
(
void
);
44
46
WINEXPORT
char
*
get_default_pid_fileName
(
const
char
*
procname
);
47
WINEXPORT
void
daemonize_me
(gboolean stay_in_foreground
48
,
const
char
* dirtorunin
49
,
char
* pidfile);
50
WINEXPORT
void
assimilation_openlog
(
const
char
* logname);
51
WINEXPORT
PidRunningStat
are_we_already_running
(
const
char
* pidfile,
int
* pid);
52
WINEXPORT
guint
pidrunningstat_to_status
(
PidRunningStat
);
53
gboolean
create_pid_file
(
const
char
* pidfile);
54
WINEXPORT
void
remove_pid_file
(
const
char
* pidfile);
55
WINEXPORT
int
kill_pid_service
(
const
char
* pidfile,
int
signal
);
56
void
rmpid_and_exit_on_signal
(
const
char
* pidfile,
int
signal
);
57
WINEXPORT
gchar **
assim_merge_environ
(
const
gchar *
const
* env,
ConfigContext
*);
58
WINEXPORT
void
assim_free_environ
(gchar ** env);
59
#endif
/* MISC_H */
60
src
include
misc.h
Generated on Tue May 21 2013 16:22:48 for The Assimilation Monitoring Project by
1.8.3.1