/[LeafOK_CVS]/lbbs/src/menu_proc.c
ViewVC logotype

Diff of /lbbs/src/menu_proc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.47 by sysadm, Wed Nov 5 14:59:31 2025 UTC Revision 1.50 by sysadm, Tue Nov 11 00:28:05 2025 UTC
# Line 6  Line 6 
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7   */   */
8    
9    #ifdef HAVE_CONFIG_H
10    #include "config.h"
11    #endif
12    
13  #include "article_cache.h"  #include "article_cache.h"
14  #include "article_favor_display.h"  #include "article_favor_display.h"
15  #include "article_view_log.h"  #include "article_view_log.h"
# Line 21  Line 25 
25  #include "user_info_update.h"  #include "user_info_update.h"
26  #include "user_list_display.h"  #include "user_list_display.h"
27  #include "user_priv.h"  #include "user_priv.h"
28    #include <ctype.h>
29  #include <dlfcn.h>  #include <dlfcn.h>
30  #include <errno.h>  #include <errno.h>
31  #include <signal.h>  #include <signal.h>
# Line 141  int reload_bbs_conf(void *param) Line 146  int reload_bbs_conf(void *param)
146    
147  int shutdown_bbs(void *param)  int shutdown_bbs(void *param)
148  {  {
149          log_common("Notify main process to exit\n");          char buf[2] = "N";
150    
151            clearscr();
152            get_data(1, 1, "真的要关闭系统吗[y/N]? ", buf, sizeof(buf), 1);
153    
154          if (kill(getppid(), SIGTERM) < 0)          if (toupper(buf[0]) == 'Y')
155          {          {
156                  log_error("Send SIGTERM signal failed (%d)\n", errno);                  log_common("Notify main process to exit by [%s]\n", BBS_username);
157    
158                    if (kill(getppid(), SIGTERM) < 0)
159                    {
160                            log_error("Send SIGTERM signal failed (%d)\n", errno);
161                    }
162          }          }
163    
164          return REDRAW;          return REDRAW;


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1