int split_version(const char *version, unsigned int *value);
int compare_current_version(const char *version);
void display_version();
+void handle_pidfile(void);
void mworker_accept_wrapper(int fd);
}
/* Only returns if everything is OK. If something fails, it exits. */
-static void handle_pidfile()
+void handle_pidfile(void)
{
char pidstr[100];
}
snprintf(pidstr, sizeof(pidstr), "%d\n", (int)getpid());
DISGUISE(write(pidfd, pidstr, strlen(pidstr)));
+ close(pidfd);
+ /* We won't ever use this anymore */
+ ha_free(&global.pidfile);
}
static void get_listeners_fd()
clock_update_date(0, 1);
clock_adjust_now_offset();
ready_date = date;
-
- /* close the pidfile both in children and father */
- if (pidfd >= 0) {
- //lseek(pidfd, 0, SEEK_SET); /* debug: emulate eglibc bug */
- close(pidfd);
- }
- /* We won't ever use this anymore */
- ha_free(&global.pidfile);
}
/* This function sets verbosity modes. Should be called after the first