Overview
| Artifact ID: | 0a97fdf9bb9efe300305b0d5929c876b52210758 |
|---|---|
| Ticket: | 3545365fffffffffffffffffffffffffffffffff
Crash in io-29.33b (no implicit flush of nonblocking on exit |
| User & Date: | ferrieux on 2012-07-24 22:45:47 |
Changes
- icomment:
As for the TclpClose: it includes a free of a strucure, so instead of moving the TclpClose call up, I'd suggest a direct low-level CloseHandle, leaving the final TclpClose where it is. A double CloseHandle can complain, but not crash: Index: win/tclWinPipe.c =================================================================== --- win/tclWinPipe.c +++ win/tclWinPipe.c @@ -1878,10 +1878,13 @@ * Wait for the writer thread to finish the current buffer, then * terminate the thread and close the handles. If the channel is * nonblocking, there should be no pending write operations. */ + /* ALEX - ugly hack to check inter-thread io cancellation */ + if (pipePtr->flags & PIPE_ASYNC) CloseHandle (((WinFile *)pipePtr->writeFile)->handle); + WaitForSingleObject(pipePtr->writable, INFINITE); /* * The thread may already have closed on it's own. Check its exit * code. - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"