* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zserver.c,v $
- * Revision 1.68 1999-05-26 07:49:13 adam
+ * Revision 1.71 1999-07-14 10:59:26 adam
+ * Changed functions isc_getmethod, isams_getmethod.
+ * Improved fatal error handling (such as missing EXPLAIN schema).
+ *
+ * Revision 1.70 1999/06/10 12:14:56 adam
+ * Fixed to use bend_start instead of pre_init.
+ *
+ * Revision 1.69 1999/06/10 09:20:03 adam
+ * Minor change to pre_init handler.
+ *
+ * Revision 1.68 1999/05/26 07:49:13 adam
* C++ compilation.
*
* Revision 1.67 1999/02/02 14:51:14 adam
#endif
#include <data1.h>
-#include <dmalloc.h>
#include "zserver.h"
}
#ifndef WIN32
-static void pre_init (struct statserv_options_block *sob)
+static void bend_start (struct statserv_options_block *sob)
{
- char *pidfile = "zebrasrv.pid";
- int fd = creat (pidfile, 0666);
-
- if (fd == -1)
- logf (LOG_WARN|LOG_ERRNO, "creat %s", pidfile);
- else
+ if (!sob->inetd)
{
- char pidstr[30];
+ char *pidfile = "zebrasrv.pid";
+ int fd = creat (pidfile, 0666);
+ if (fd == -1)
+ logf (LOG_WARN|LOG_ERRNO, "creat %s", pidfile);
+ else
+ {
+ char pidstr[30];
- sprintf (pidstr, "%ld", (long) getpid ());
- write (fd, pidstr, strlen(pidstr));
- close (fd);
+ sprintf (pidstr, "%ld", (long) getpid ());
+ write (fd, pidstr, strlen(pidstr));
+ close (fd);
+ }
}
}
#endif
sob = statserv_getcontrol ();
strcpy (sob->configname, FNAME_CONFIG);
#ifndef WIN32
- sob->pre_init = pre_init;
+ sob->bend_start = bend_start;
#endif
statserv_setcontrol (sob);