/[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.46 by sysadm, Wed Nov 5 01:04:06 2025 UTC Revision 1.49 by sysadm, Fri Nov 7 12:02:25 2025 UTC
# Line 18  Line 18 
18  #include "menu.h"  #include "menu.h"
19  #include "section_list_display.h"  #include "section_list_display.h"
20  #include "screen.h"  #include "screen.h"
21    #include "user_info_update.h"
22  #include "user_list_display.h"  #include "user_list_display.h"
23  #include "user_priv.h"  #include "user_priv.h"
24    #include <ctype.h>
25  #include <dlfcn.h>  #include <dlfcn.h>
26  #include <errno.h>  #include <errno.h>
27  #include <signal.h>  #include <signal.h>
# Line 140  int reload_bbs_conf(void *param) Line 142  int reload_bbs_conf(void *param)
142    
143  int shutdown_bbs(void *param)  int shutdown_bbs(void *param)
144  {  {
145          log_common("Notify main process to exit\n");          char buf[2] = "N";
146    
147          if (kill(getppid(), SIGTERM) < 0)          clearscr();
148            get_data(1, 1, "真的要关闭系统吗[y/N]? ", buf, sizeof(buf), 1);
149    
150            if (toupper(buf[0]) == 'Y')
151          {          {
152                  log_error("Send SIGTERM signal failed (%d)\n", errno);                  log_common("Notify main process to exit by [%s]\n", BBS_username);
153    
154                    if (kill(getppid(), SIGTERM) < 0)
155                    {
156                            log_error("Send SIGTERM signal failed (%d)\n", errno);
157                    }
158          }          }
159    
160          return REDRAW;          return REDRAW;
# Line 356  int list_online_user(void *param) Line 366  int list_online_user(void *param)
366          }          }
367    
368          return REDRAW;          return REDRAW;
369    }
370    
371    int edit_intro(void *param)
372    {
373            if (user_intro_edit(BBS_priv.uid) < 0)
374            {
375                    log_error("user_intro_edit(%d) error\n", BBS_priv.uid);
376            }
377    
378            return REDRAW;
379  }  }


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

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