- Timestamp:
- Mar 27, 2012, 9:57:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_processcheck.c
r394 r398 864 864 { 865 865 int cc; 866 unsigned int lnum = 0;867 unsigned long num = 0;866 volatile unsigned int lnum = 0; 867 volatile unsigned long num = 0; 868 868 char c; 869 869 unsigned int pos = 0; … … 907 907 char errbuf[SH_ERRBUF_SIZE]; 908 908 909 /* SH_MUTEX_LOCK(mutex_thread_nolog) is in caller */909 SH_MUTEX_LOCK(mutex_thread_nolog); 910 910 sh_error_handle(SH_ERR_ALL, FIL__, __LINE__, errno, MSG_E_SUBGEN, 911 911 sh_error_message(errno, errbuf, sizeof(errbuf)), 912 912 _("sh_processes_readps")); 913 SH_MUTEX_UNLOCK(mutex_thread_nolog); 913 914 break; 914 915 } … … 930 931 if (flag_err_debug == SL_TRUE) 931 932 { 932 /* SH_MUTEX_LOCK(mutex_thread_nolog) is in caller */933 SH_MUTEX_LOCK(mutex_thread_nolog); 933 934 sh_error_handle(SH_ERR_ALL, FIL__, __LINE__, num, 934 935 MSG_E_SUBGEN, 935 936 tstr, 936 937 _("sh_processes_readps")); 938 SH_MUTEX_UNLOCK(mutex_thread_nolog); 937 939 } 938 940 /* fprintf(stderr, "<%ld> %s\n", num, tstr); */ … … 1078 1080 if (status != 0) 1079 1081 { 1080 /* SH_MUTEX_LOCK(mutex_thread_nolog) is in caller */1082 SH_MUTEX_LOCK(mutex_thread_nolog); 1081 1083 sh_error_handle(SH_ERR_ALL, FIL__, __LINE__, status, MSG_E_SUBGEN, 1082 1084 _("Could not open pipe"), _("sh_processes_runps")); 1085 SH_MUTEX_UNLOCK(mutex_thread_nolog); 1083 1086 SL_RETURN ((-1), _("sh_processes_runps")); 1084 1087 } … … 1161 1164 } 1162 1165 1163 SH_MUTEX_LOCK(mutex_thread_nolog);1164 1166 retval = sh_processes_runps (res, NULL, 0, SH_PR_PS, 0); 1165 SH_MUTEX_UNLOCK(mutex_thread_nolog); 1167 1166 1168 for (i = sh_prochk_minpid; i != sh_prochk_maxpid; ++i) 1167 1169 { … … 1169 1171 res[j] = sh_processes_check ((pid_t) i, res[j]); 1170 1172 } 1171 SH_MUTEX_LOCK(mutex_thread_nolog); 1173 1172 1174 retval += sh_processes_runps (res, NULL, 0, SH_PR_PS2, 0); 1173 SH_MUTEX_UNLOCK(mutex_thread_nolog);1174 1175 1175 1176 if (retval != 0)
Note:
See TracChangeset
for help on using the changeset viewer.