Overview
| Artifact ID: | 8bb01f3870b7a84f06bc020fdd01ecc93e6f4151 |
|---|---|
| Ticket: | 496733ffffffffffffffffffffffffffffffffff
Possible fix for obscure fconfigure bug |
| User & Date: | mdejong on 2001-12-26 06:50:10 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
I ran into this bug while re-implementing fconfigure in Jacl. It seems the Tcl_GetChannelOption function does not quite know what to do about a channel that is neither readable nor writable. Here is what it currently returns: % set sock [socket -server accept 0] sock3 % fconfigure $sock -blocking 1 -buffering full -buffersize 4096 -encoding iso8859-1 -eofchar -translation -sockname {0.0.0.0 0.0.0.0 2001} The -eofchar and -translation properties should at least have some value in the list. What exactly these properties would be used for on a server socket is not clear. For example, why would you want to set the -blocking property on a server socket? Also note that the Tcl_SetChannelOption method does not know how to set these values since it is not clear if the input out the output value would be changed for a server socket. The quick solution I came up with was to just pretend these values are read only. It was easy to implement and test and I can't imagine this would actually matter to anyone, so it seemed like the right thing to do. The attached patch implements these changes and add some test cases that check the behavior. - foundin changed to: "obsolete: 8.4a4"
- priority changed to: "3 Low"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "mdejong"
- subsystem changed to: "24. Channel Commands"
- title changed to: "Possible fix for obscure fconfigure bug"
- type changed to: "Bug"