ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
(Generate patch)

Comparing ircd-hybrid-7.2/src/ircd.c (file contents):
Revision 998 by michael, Sun Aug 23 12:43:17 2009 UTC vs.
Revision 1001 by michael, Sat Aug 29 22:44:44 2009 UTC

# Line 123 | Line 123 | unsigned int split_servers;
123   int rehashed_klines = 0;
124  
125  
126 #ifndef _WIN32
126   /*
127   * print_startup - print startup information
128   */
# Line 154 | Line 153 | make_daemon(void)
153  
154    setsid();
155   }
157 #endif
156  
157   static int printVersion = 0;
158  
# Line 184 | Line 182 | set_time(void)
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  
# Line 208 | Line 194 | set_time(void)
194                           strerror(errno));
195      restart("Clock Failure");
196    }
211 #endif
197  
198    if (newtime.tv_sec < CurrentTime)
199    {
# Line 400 | Line 385 | write_pidfile(const char *filename)
385   static void
386   check_pidfile(const char *filename)
387   {
403 #ifndef _WIN32
388    FBFILE *fb;
389    char buff[32];
390    pid_t pidfromfile;
# Line 432 | Line 416 | check_pidfile(const char *filename)
416    {
417      /* log(L_ERROR, "Error opening pid file %s", filename); */
418    }
435 #endif
419   }
420  
421   /* setup_corefile()
# Line 508 | Line 491 | main(int argc, char *argv[])
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");
# Line 517 | Line 499 | main(int argc, char *argv[])
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();
# Line 566 | Line 547 | main(int argc, char *argv[])
547  
548    init_ssl();
549  
569 #ifndef _WIN32
550    if (!server_state.foreground)
551    {
552      make_daemon();
# Line 576 | Line 556 | main(int argc, char *argv[])
556      print_startup(getpid());
557  
558    setup_signals();
579 #endif
559  
560    get_ircd_platform(ircd_platform);
561  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)