/[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.48 by sysadm, Fri Nov 7 09:53:47 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 <dlfcn.h>  #include <dlfcn.h>
# Line 140  int reload_bbs_conf(void *param) Line 141  int reload_bbs_conf(void *param)
141    
142  int shutdown_bbs(void *param)  int shutdown_bbs(void *param)
143  {  {
144          log_common("Notify main process to exit\n");          char buf[2] = "N";
145    
146          if (kill(getppid(), SIGTERM) < 0)          clearscr();
147            get_data(1, 1, "真的要关闭系统吗[y/N]? ", buf, sizeof(buf), 1);
148    
149            if (toupper(buf[0]) == 'Y')
150          {          {
151                  log_error("Send SIGTERM signal failed (%d)\n", errno);                  log_common("Notify main process to exit by [%s]\n", BBS_username);
152    
153                    if (kill(getppid(), SIGTERM) < 0)
154                    {
155                            log_error("Send SIGTERM signal failed (%d)\n", errno);
156                    }
157          }          }
158    
159          return REDRAW;          return REDRAW;
# Line 356  int list_online_user(void *param) Line 365  int list_online_user(void *param)
365          }          }
366    
367          return REDRAW;          return REDRAW;
368    }
369    
370    int edit_intro(void *param)
371    {
372            if (user_intro_edit(BBS_priv.uid) < 0)
373            {
374                    log_error("user_intro_edit(%d) error\n", BBS_priv.uid);
375            }
376    
377            return REDRAW;
378  }  }


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

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