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

Diff of /lbbs/src/bbs_main.c

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

Revision 1.73 by sysadm, Sat Jun 21 02:15:18 2025 UTC Revision 1.74 by sysadm, Tue Jun 24 10:01:24 2025 UTC
# Line 29  Line 29 
29  #include "section_list.h"  #include "section_list.h"
30  #include "trie_dict.h"  #include "trie_dict.h"
31  #include "user_priv.h"  #include "user_priv.h"
32    #include <errno.h>
33    #include <signal.h>
34  #include <stdlib.h>  #include <stdlib.h>
35  #include <string.h>  #include <string.h>
36  #include <time.h>  #include <time.h>
# Line 242  int bbs_center() Line 244  int bbs_center()
244                          switch (menu_control(p_bbs_menu, ch))                          switch (menu_control(p_bbs_menu, ch))
245                          {                          {
246                          case EXITBBS:                          case EXITBBS:
247                            case EXITMENU:
248                                  return 0;                                  return 0;
249                          case REDRAW:                          case REDRAW:
250                                  t_last_action = time(NULL);                                  t_last_action = time(NULL);
# Line 267  int bbs_center() Line 270  int bbs_center()
270    
271  int bbs_main()  int bbs_main()
272  {  {
273            struct sigaction act = {0};
274    
275            // Set signal handler
276            act.sa_handler = SIG_IGN;
277            if (sigaction(SIGHUP, &act, NULL) == -1)
278            {
279                    log_error("set signal action of SIGHUP error: %d\n", errno);
280                    goto cleanup;
281            }
282            act.sa_handler = SIG_DFL;
283            if (sigaction(SIGCHLD, &act, NULL) == -1)
284            {
285                    log_error("set signal action of SIGCHLD error: %d\n", errno);
286                    goto cleanup;
287            }
288    
289          // Set data pools in shared memory readonly          // Set data pools in shared memory readonly
290          if (set_trie_dict_shm_readonly() < 0)          if (set_trie_dict_shm_readonly() < 0)
291          {          {


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

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