Changeset 143 for trunk/src/samhain.c
- Timestamp:
- Oct 31, 2007, 1:09:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain.c
r142 r143 114 114 volatile int sh_global_suspend_flag; 115 115 volatile int sig_fresh_trail; /* SIGIOT */ 116 volatile int sh_thread_pause_flag = S_FALSE; 116 117 volatile int sig_config_read_again; /* SIGHUP */ 117 118 volatile int sig_terminate; /* SIGQUIT */ … … 1724 1725 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_RECONF); 1725 1726 1727 sh_thread_pause_flag = S_TRUE; 1728 1726 1729 #if defined(WITH_EXTERNAL) 1727 1730 /* delete list of external tasks … … 1793 1796 sh.flag.loop = S_FALSE; 1794 1797 } 1798 1799 sh_thread_pause_flag = S_FALSE; 1795 1800 1796 1801 /* --- Initialize modules. --- … … 1829 1834 if (sig_fresh_trail == 1) /* SIGIOT */ 1830 1835 { 1831 /* Logfile access 1832 */ 1836 if (sh_global_suspend_flag == 0) 1837 { 1838 SH_MUTEX_LOCK(mutex_thread_nolog); 1839 1840 /* Logfile access 1841 */ 1833 1842 #ifdef SH_USE_XML 1834 (void) sh_log_file (NULL, NULL); 1835 #endif 1836 TPT((0, FIL__, __LINE__, _("msg=<Logfile stop/restart.>\n"))); 1837 sh_error_only_stderr (S_TRUE); 1838 (void) sh_unix_rm_lock_file(sh.srvlog.name); 1839 (void) retry_msleep(3, 0); 1840 sh.flag.log_start = S_TRUE; 1841 sh_error_only_stderr (S_FALSE); 1842 sig_fresh_trail = 0; 1843 --sig_raised; 1843 (void) sh_log_file (NULL, NULL); 1844 #endif 1845 TPT((0, FIL__, __LINE__, _("msg=<Logfile stop/restart.>\n"))); 1846 sh_error_only_stderr (S_TRUE); 1847 (void) sh_unix_rm_lock_file(sh.srvlog.name); 1848 (void) retry_msleep(3, 0); 1849 sh.flag.log_start = S_TRUE; 1850 sh_error_only_stderr (S_FALSE); 1851 sh_thread_pause_flag = S_FALSE; 1852 sig_fresh_trail = 0; 1853 --sig_raised; 1854 SH_MUTEX_UNLOCK(mutex_thread_nolog); 1855 } 1844 1856 } 1845 1857 … … 1863 1875 { 1864 1876 TPT((0, FIL__, __LINE__, _("msg=<Suspend switch.>\n"))); 1865 if (sh_global_suspend_flag == 1) {1866 sh_global_suspend_flag = 0;1867 } else {1877 if (sh_global_suspend_flag != 1) { 1878 SH_MUTEX_LOCK_UNSAFE(mutex_thread_nolog); 1879 sh_global_suspend_flag = 1; 1868 1880 sh_error_handle((-1), FIL__, __LINE__, 0, MSG_SUSPEND, 1869 1881 sh.prg_name); 1870 sh_global_suspend_flag = 1; 1882 } else { 1883 sh_global_suspend_flag = 0; 1884 SH_MUTEX_UNLOCK_UNSAFE(mutex_thread_nolog); 1871 1885 } 1872 1886 --sig_suspend_switch;
Note:
See TracChangeset
for help on using the changeset viewer.