1
/* Copyright (C) 2003 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
25
* lockfile the "pid file" or other resource to lock exclusively
26
* logfile daemon output is directed here (input is set to /dev/null)
27
* if NULL, output redirection is not done
28
* flags none currently
29
* returns 0 on success, on error -1
32
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags);
35
* Test if the daemon is running (file is locked).
36
* lockfile the "pid file"
37
* flags none currently
38
* return 0 no, 1 yes, -1
41
NdbDaemon_Test(const char* lockfile, unsigned flags);
45
* lockfile the "pid file"
46
* flags none currently
47
* return 0 killed, 1 not running, -1 other error
50
NdbDaemon_Kill(const char* lockfile, unsigned flags);
53
* Pid from last call, either forked off or found in lock file.
55
extern long NdbDaemon_DaemonPid;
58
* Error code from last failed call.
60
extern int NdbDaemon_ErrorCode;
63
* Error text from last failed call.
65
extern char NdbDaemon_ErrorText[];