123 |
|
int rehashed_klines = 0; |
124 |
|
|
125 |
|
|
126 |
– |
#ifndef _WIN32 |
126 |
|
/* |
127 |
|
* print_startup - print startup information |
128 |
|
*/ |
153 |
|
|
154 |
|
setsid(); |
155 |
|
} |
157 |
– |
#endif |
156 |
|
|
157 |
|
static int printVersion = 0; |
158 |
|
|
182 |
|
{ |
183 |
|
static char to_send[200]; |
184 |
|
struct timeval newtime; |
187 |
– |
#ifdef _WIN32 |
188 |
– |
FILETIME ft; |
189 |
– |
|
190 |
– |
GetSystemTimeAsFileTime(&ft); |
191 |
– |
if (ft.dwLowDateTime < 0xd53e8000) |
192 |
– |
ft.dwHighDateTime--; |
193 |
– |
ft.dwLowDateTime -= 0xd53e8000; |
194 |
– |
ft.dwHighDateTime -= 0x19db1de; |
195 |
– |
|
196 |
– |
newtime.tv_sec = (*(uint64_t *) &ft) / 10000000; |
197 |
– |
newtime.tv_usec = (*(uint64_t *) &ft) / 10 % 1000000; |
198 |
– |
#else |
185 |
|
newtime.tv_sec = 0; |
186 |
|
newtime.tv_usec = 0; |
187 |
|
|
194 |
|
strerror(errno)); |
195 |
|
restart("Clock Failure"); |
196 |
|
} |
211 |
– |
#endif |
197 |
|
|
198 |
|
if (newtime.tv_sec < CurrentTime) |
199 |
|
{ |
385 |
|
static void |
386 |
|
check_pidfile(const char *filename) |
387 |
|
{ |
403 |
– |
#ifndef _WIN32 |
388 |
|
FBFILE *fb; |
389 |
|
char buff[32]; |
390 |
|
pid_t pidfromfile; |
416 |
|
{ |
417 |
|
/* log(L_ERROR, "Error opening pid file %s", filename); */ |
418 |
|
} |
435 |
– |
#endif |
419 |
|
} |
420 |
|
|
421 |
|
/* setup_corefile() |
491 |
|
/* Check to see if the user is running |
492 |
|
* us as root, which is a nono |
493 |
|
*/ |
511 |
– |
#ifndef _WIN32 |
494 |
|
if (geteuid() == 0) |
495 |
|
{ |
496 |
|
fprintf(stderr, "Don't run ircd as root!!!\n"); |
499 |
|
|
500 |
|
/* Setup corefile size immediately after boot -kre */ |
501 |
|
setup_corefile(); |
520 |
– |
#endif |
502 |
|
|
503 |
|
/* save server boot time right away, so getrusage works correctly */ |
504 |
|
set_time(); |
547 |
|
|
548 |
|
init_ssl(); |
549 |
|
|
569 |
– |
#ifndef _WIN32 |
550 |
|
if (!server_state.foreground) |
551 |
|
{ |
552 |
|
make_daemon(); |
556 |
|
print_startup(getpid()); |
557 |
|
|
558 |
|
setup_signals(); |
579 |
– |
#endif |
559 |
|
|
560 |
|
get_ircd_platform(ircd_platform); |
561 |
|
|