diff options
author | unknown <tomas@mc05.(none)> | 2004-05-12 14:16:04 +0200 |
---|---|---|
committer | unknown <tomas@mc05.(none)> | 2004-05-12 14:16:04 +0200 |
commit | 79f269cb4d342305bc2e34939d881ba210692340 (patch) | |
tree | 0a287afb5067d5c23b649dee42ffbca4fcf659df /ndb | |
parent | 3f46ae17a2f8d65a816091a8d643917c2b2815f6 (diff) | |
download | mariadb-git-79f269cb4d342305bc2e34939d881ba210692340.tar.gz |
Daemon code to run on all unixes
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/common/portlib/unix/NdbDaemon.c | 6 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbDaemon.c | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/ndb/src/common/portlib/unix/NdbDaemon.c b/ndb/src/common/portlib/unix/NdbDaemon.c index 6eb319e1fcf..186331a4dab 100644 --- a/ndb/src/common/portlib/unix/NdbDaemon.c +++ b/ndb/src/common/portlib/unix/NdbDaemon.c @@ -18,11 +18,10 @@ #include "NdbDaemon.h" #define NdbDaemon_ErrorSize 500 -#if defined(NDB_LINUX) || defined(NDB_SOLARIS) - /* XXX fix other unixes */ long NdbDaemon_DaemonPid; int NdbDaemon_ErrorCode; char NdbDaemon_ErrorText[NdbDaemon_ErrorSize]; + int 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 */ return 0; } -#else + +#if 0 int NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) { diff --git a/ndb/src/common/portlib/win32/NdbDaemon.c b/ndb/src/common/portlib/win32/NdbDaemon.c index b96d4c20260..972fb1b88d8 100644 --- a/ndb/src/common/portlib/win32/NdbDaemon.c +++ b/ndb/src/common/portlib/win32/NdbDaemon.c @@ -14,6 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "NdbDaemon.h" #define NdbDaemon_ErrorSize 500 @@ -24,8 +25,10 @@ char NdbDaemon_ErrorText[NdbDaemon_ErrorSize]; int NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) { - // XXX do something - return 0; + /* Fail */ + snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize, + "Daemon mode not implemented"); + return -1; } #ifdef NDB_DAEMON_TEST |