Changeset 2884 for trunk/src/kWorker
- Timestamp:
- Sep 6, 2016, 5:11:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kWorker/kWorker.c
r2883 r2884 7335 7335 rc = kwErrPrintfRc(-1, "Bogus message length: %u (%#x)\n", cbMsg, cbMsg); 7336 7336 } 7337 FlushFileBuffers(hPipe); 7337 7338 /* 7339 * If we're exitting because we're restarting, we need to delay till 7340 * kmk/kSubmit has read the result. Windows documentation says it 7341 * immediately discards pipe buffers once the pipe is broken by the 7342 * server (us). So, We flush the buffer and queues a 1 byte read 7343 * waiting for kSubmit to close the pipe when it receives the 7344 * bExiting = K_TRUE result. 7345 */ 7346 if (g_fRestart) 7347 { 7348 KU8 b; 7349 FlushFileBuffers(hPipe); 7350 ReadFile(hPipe, &b, 1, &cbMsg, NULL); 7351 } 7352 7338 7353 CloseHandle(hPipe); 7339 7354 return rc > 0 ? 0 : 1;
Note:
See TracChangeset
for help on using the changeset viewer.