+ zebra_server_lock_destroy (zi);
+
+ res_close (zi->res);
+ xfree (zi);
+}
+
+#ifndef WINDOWS
+static void pre_init (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
+ {
+ char pidstr[30];
+
+ sprintf (pidstr, "%ld", (long) getpid ());
+ write (fd, pidstr, strlen(pidstr));
+ close (fd);
+ }