Changeset 1271 for trunk/dll/systemf.c
- Timestamp:
- Nov 10, 2008, 4:58:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/systemf.c
r1270 r1271 62 62 63 63 static PSZ pszSrcFile = __FILE__; 64 65 HEV hWaitChildSem;66 64 67 65 //static HAPP Exec(HWND hwndNotify, BOOL child, char *startdir, char *env, … … 694 692 static char szTermQName[30]; 695 693 static HQUEUE hTermQ; 696 //static HEV hTermQSem;694 static HEV hTermQSem; 697 695 698 696 if (pszDirectory && *pszDirectory) { … … 1082 1080 } 1083 1081 else { 1084 rc = DosCreateEventSem(NULL,(PHEV)&h WaitChildSem,0,FALSE);1082 rc = DosCreateEventSem(NULL,(PHEV)&hTermQSem,0,FALSE); 1085 1083 if (rc) { 1086 h WaitChildSem = (HEV)0; // Try to survive1084 hTermQSem = (HEV)0; // Try to survive 1087 1085 DosCloseQueue(hTermQ); 1088 1086 hTermQ = (HQUEUE)0; // Try to survive … … 1093 1091 } 1094 1092 } // if 1st time 1095 useTermQ = hTermQ && h WaitChildSem;1093 useTermQ = hTermQ && hTermQSem; 1096 1094 if (!rc) 1097 1095 DosExitCritSec(); … … 1134 1132 // sdata.PgmInputs, sdata.TermQ, sdata.InheritOpt, 1135 1133 // sdata.SessionType, szTermQName, 1136 // hTermQ, hWaitChildSem); fflush(stdout);1134 // hTermQ, ); fflush(stdout); 1137 1135 ret = DosStartSession(&sdata, &ulSessID, &sessPID); 1138 1136 … … 1181 1179 } 1182 1180 else { 1183 ULONG clPosted;1184 1185 DosResetEventSem(hWaitChildSem, &clPosted);1186 1181 for (ctr = 0;; ctr++) 1187 1182 { 1188 1183 if (ctr < 20) { 1189 1184 rc = DosReadQueue(hTermQ, &rq, &ulLength, (PPVOID)&pTermInfo, 0, 1190 DCWW_NOWAIT, &bPriority, h WaitChildSem);1185 DCWW_NOWAIT, &bPriority, hTermQSem); 1191 1186 if (rc == ERROR_QUE_EMPTY) { 1192 1187 DosSleep(50);//05 Aug 07 GKY 100 … … 1215 1210 1216 1211 if (pTermInfo->usSessID == ulSessID) { 1217 DosPostEventSem(hWaitChildSem); //Posted to WaitChildThread (arccnrs.c)1218 1212 priority_bumped(); 1213 break; // Our session is done 1219 1214 } 1220 1215
Note:
See TracChangeset
for help on using the changeset viewer.