/[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.48 by sysadm, Fri Nov 7 09:53:47 2025 UTC
# Line 141  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;


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

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