示例#1
0
void	restart(char *mesg)
{
#ifdef	USE_SYSLOG
	(void)syslog(LOG_WARNING, "Restarting Server because: %s (%u)", mesg,
		     (u_int)((char *)sbrk((size_t)0)-sbrk0));
#endif
	sendto_flag(SCH_NOTICE, "Restarting server because: %s (%u)", mesg,
		    (u_int)((char *)sbrk((size_t)0)-sbrk0));
	server_reboot();
}
示例#2
0
void
restart(const char *mesg)
{
	static int was_here = NO;	/* redundant due to restarting flag below */

	if(was_here)
		abort();
	was_here = YES;

	ilog(L_NOTICE, "Restarting Server because: %s, memory data limit: %ld", mesg, get_maxrss());

	server_reboot();
}
示例#3
0
void
restart(const char *mesg)
{
	static int was_here = NO;	/* redundant due to restarting flag below */

	if(was_here)
		abort();
	was_here = YES;

	ilog(L_MAIN, "Restarting Server because: %s", mesg);

	server_reboot();
}
示例#4
0
void restart(char *mesg) 
{
   static int  was_here = NO;	/* redundant due to restarting flag below */
   if (was_here)
      abort();
   was_here = YES;
	
#ifdef	USE_SYSLOG
   (void) syslog(LOG_WARNING, "Restarting Server because: %s, sbrk(0)-etext: %d",
			  mesg, (u_int) sbrk((size_t) 0) - (u_int) sbrk0);
#endif
   server_reboot();
}
示例#5
0
VOIDSIG s_restart()
{
  static int restarting = 0;

#ifdef	USE_SYSLOG
  (void)syslog(LOG_WARNING, "Server Restarting on SIGINT");
#endif
  if (restarting == 0)
    {
      /* Send (or attempt to) a dying scream to oper if present */

      restarting = 1;
      server_reboot();
    }
}
示例#6
0
/*
 * sigint_handler - restart the server
 */
static void
sigint_handler(int sig)
{
    static int restarting = 0;

    if(server_state_foreground) {
        ilog(L_MAIN, "Server exiting on SIGINT");
        exit(0);
    } else {
        ilog(L_MAIN, "Server Restarting on SIGINT");
        if(restarting == 0) {
            restarting = 1;
            server_reboot();
        }
    }
}
示例#7
0
VOIDSIG s_restart(int signum) 
{
	static int  restarting = 0;
	
   if (signum == SIGINT && (bootopt & (BOOT_OPER|BOOT_STDERR|BOOT_INETD))) {
       s_die();
       return;
   }

#ifdef	USE_SYSLOG
   (void) syslog(LOG_WARNING, "Server Restarting on SIGINT");
#endif
   if (restarting == 0) 
   {
      /* Send (or attempt to) a dying scream to oper if present */
      restarting = 1;
      server_reboot();
   }
}