Overview
| Artifact ID: | d84ab85194d816ca4bc44fa72d96300a138a3e2c |
|---|---|
| Ticket: | b0e16e3f34ff4c76c1177126380e9fb0d7535d49
Crash (Tcl_Panic) when closing a file channel |
| User & Date: | gcramer on 2017-08-11 15:46:05 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
I have created a file channel with an open file descriptor <em>fd</em>: <verbatim> m_chan = Tcl_MakeFileChannel(fd, TCL_READABLE); </verbatim> <p> Later I'm closing the file channel, but at this time the file descriptor is already closed (the file descriptor comes from an external library): <verbatim> Tcl_Close(NULL, m_chan); </verbatim> <p> Now in function <code>PlatformEventsControl()</code> [unix/tclEpollNotfy.c:245] <code>Tcl_Panic()</code> will be invoked, and my program is aborting. This behavior is new, and I think that this should not happen at all, all system functions are able to work with closed file descriptors (without aborting the program). Please note that in my case the file descriptor comes from an external library, so I have no control about it's state. Of course I could check the state before calling <code>Tcl_Close()</code>, but this is no solution, because how should I release the created channel when not with <code>Tcl_Close()</code>? Furthermore this behavior is incompatible to previous Tcl version 8.6. - foundin changed to: "8.7"
- is_private changed to: "0"
- login: "gcramer"
- priority changed to: "5 Medium"
- private_contact changed to: "9b7155594aadef44d10a978838b8fe108cdafdd1"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "gcramer"
- subsystem changed to: "25. Channel System"
- title changed to: "Crash (Tcl_Panic) when closing a file channel"
- type changed to: "Bug"