Overview
| Artifact ID: | ae8dcf185005d78c78a060104c337f5eeaf461a3 |
|---|---|
| Ticket: | 3545365fffffffffffffffffffffffffffffffff
Crash in io-29.33b (no implicit flush of nonblocking on exit |
| User & Date: | twylite on 2012-07-24 20:32:12 |
Changes
- icomment:
In tclWinPipe.c, PipeWriterThread() only calls SetEvent(infoPtr->writable) once the WriteFile() loop has written out all data. i.e. WaitForSingleObject(pipePtr->writable) will only wake once the flush is complete. If the file handle is closed then WriteFile() should fail and the thread should terminate. I tried moving TclpCloseFile(pipePtr->writeFile) in PipeClose2Proc() to above WaitForSingleObject(pipePtr->writable), but that doesn't help, because of this: TclpCloseFile: /* * Don't close the Win32 handle if the handle is a standard channel * during the thread exit process. Otherwise, one thread may kill the * stdio of another. */ Hmm.
- login: "twylite"
- mimetype: "text/plain"
- username: "twylite"