Commit 77f9069c authored by tomas@mc05.(none)'s avatar tomas@mc05.(none)

Daemon code to run on all unixes

parent ac92bd58
...@@ -18,11 +18,10 @@ ...@@ -18,11 +18,10 @@
#include "NdbDaemon.h" #include "NdbDaemon.h"
#define NdbDaemon_ErrorSize 500 #define NdbDaemon_ErrorSize 500
#if defined(NDB_LINUX) || defined(NDB_SOLARIS)
/* XXX fix other unixes */
long NdbDaemon_DaemonPid; long NdbDaemon_DaemonPid;
int NdbDaemon_ErrorCode; int NdbDaemon_ErrorCode;
char NdbDaemon_ErrorText[NdbDaemon_ErrorSize]; char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
int int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{ {
...@@ -130,7 +129,8 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) ...@@ -130,7 +129,8 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
/* Success */ /* Success */
return 0; return 0;
} }
#else
#if 0
int int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{ {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "NdbDaemon.h" #include "NdbDaemon.h"
#define NdbDaemon_ErrorSize 500 #define NdbDaemon_ErrorSize 500
...@@ -24,8 +25,10 @@ char NdbDaemon_ErrorText[NdbDaemon_ErrorSize]; ...@@ -24,8 +25,10 @@ char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
int int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{ {
// XXX do something /* Fail */
return 0; snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
"Daemon mode not implemented");
return -1;
} }
#ifdef NDB_DAEMON_TEST #ifdef NDB_DAEMON_TEST
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment