summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
Commit message (Collapse)AuthorAgeFilesLines
* Re-using the "interp" field to signal a dead channel (via NULL value) dgp2011-09-201-6/+13
| | | | | interfered with conditional cleanup tasks testing for "the right interp" Added a new field "dead" to perform the dead channel signalling task so the corrupted logic is avoided.
* Conversion from [testthread] to Thread package stops most memory leaks.dgp2011-09-191-0/+1
|
* Plug leak of a ReflectedChannel in test iocmd.tf-32.0dgp2011-09-191-22/+36
|
* Plug a number of MarshallError memleaks.dgp2011-09-191-3/+9
|
* 3396948 Leak of ReflectedChannelMap.dgp2011-08-231-4/+3
|
* Use Tcl_PrintfObj to generate more (complex) error messages.dkf2011-08-051-25/+18
|
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-15/+13
| | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-1/+1
| | | the Engineering Manual.
* More gcc warnings: variable set but not usedpseudotrunk_2011_03_08jan.nijtmans2011-03-081-2/+0
|
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| | | | | | more harm than good. Purged them.
| * * generic/tclIORChan.c: [Bug 3034840]: Fixed reference countingandreas_kupries2010-08-041-24/+63
| | | | | | | | * tests/ioCmd.test: in InvokeTclMethod and callers.
| * * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput,andreas_kupries2010-03-301-47/+86
| | | | | | | | | | | | | | | | ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve ReflectedChannel* structures across handler invokations, to avoid crashes when the handler implementation induces nested callbacks and destruction of the channel deep inside such a nesting.
| * * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieuxandreas_kupries2010-03-091-6/+27
| | | | | | | | | | | | * doc/refchan.n: <ferrieux@users.sourceforge.net> for debugging and fixing * tests/ioCmd.test: the problem. It is the write-side equivalent to the bug fixed 2009-08-06.
| * * generic/tclIORChan.c (ErrnoReturn): Replace the hardwiredandreas_kupries2009-10-071-2/+2
| | | | | | | | | | | | constant 11 with the proper errno define, EAGAIN. What was I thinking ? The BSD's have a different errno assignment and break with the hardwired number. Reported by emiliano on the chat.
| * * doc/refchan.n [Bug 2827000]: Extended the implementation ofandreas_kupries2009-08-061-4/+71
| | | | | | | | | | | | | | | | * generic/tclIORChan.c: reflective channels (TIP 219, method * tests/ioCmd.test: 'read'), enabling handlers to signal EAGAIN to indicate 'no data, but not at EOF either', and other system errors. Updated documentation, extended testsuite (New test cases iocmd*-23.{9,10}).
| * * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202].andreas_kupries2009-01-221-8/+13
| | | | | | | | | | | | Closing a channel may supply NULL for the 'interp'. Test for finalization needs to be different, and one place has to pull the interp out of the channel instead.
| * * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leakandreas_kupries2008-07-031-1/+13
| | | | | | | | | | reported in [Bug 1987821]. Thanks to Miguel for the rpeort and Don Porter for tracking the cause down.
| * fix warningdas2008-05-031-2/+1
| |
| * * tests/ioCmd.test: Extended testsuite for reflected channelandreas_kupries2008-04-241-48/+334
| | | | | | | | | | | | | | | | | | | | implementation. Added test cases about how it handles if the rug is pulled out from under a channel (= killing threads, interpreters containing the tcl command for a channel, and channel sitting in a different interpreter/thread.) * generic/tclIORChan.c: Fixed the bugs exposed by the new testcases, redone most of the cleanup and exit handling.
| * * generic/tclIORChan.c (ReflectOutput): Allow zero return fromandreas_kupries2008-04-041-2/+13
| | | | | | | | | | | | | | | | write when input was zero-length anyway. Otherwise keept it an error, and separate the message from 'written too much'. * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed message.
| * * generic/tclIORChan.c (ReflectClose): Added missing removal ofandreas_kupries2008-04-041-1/+15
| | | | | | | | | | | | | | | | | | the now closed channel from the reflection map. Before we could crash the system by invoking 'chan postevent' on a closed reflected channel, dereferencing the dangling pointer in the map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above.
* | * generic/tclIORChan.c: [Bug 3034840]: Fixed reference countingandreas_kupries2010-08-041-27/+71
| | | | | | | | | | * generic/tclIORTrans.c: in InvokeTclMethod and callers. * tests/ioTrans.test:
* | Use "tclIO.h" and "tclTomMathDecls.h" everywherenijtmans2010-05-031-2/+2
| |
* | If tclInt.h or tclPort.h is alreadynijtmans2010-04-271-2/+2
| | | | | | | | | | | | | | included, don't include <limits.h> again. Follow-up to [Bug 2991415]: tclport.h #included before limits.h See comments in [Bug 2991415]
* | * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput,andreas_kupries2010-03-301-59/+98
| | | | | | | | | | | | | | | | ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve ReflectedChannel* structures across handler invokations, to avoid crashes when the handler implementation induces nested callbacks and destruction of the channel deep inside such a nesting.
* | * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieuxandreas_kupries2010-03-091-6/+27
| | | | | | | | | | | | * doc/refchan.n: <ferrieux@users.sourceforge.net> for debugging and fixing * tests/ioCmd.test: the problem. It is the write-side equivalent to the bug fixed 2009-08-06.
* | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-29/+30
| |
* | * win/tclWinDde.c: VC++ 6.0 doesn't havenijtmans2010-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation.
* | Cast required when setting result using a const string. String is copied by ↵patthoyts2009-11-211-2/+2
| | | | | | | | TCL_VOLATILE.
* | Fix [Bug 2849797]: channel name inconsistencies as suggested by DKFnijtmans2009-11-181-2/+2
| | | | | | | | | | | | minor *** POTENTIAL INCOMPATIBILITY *** because Tcl_CreateChannel() and its derivatives, now sometimes ignore their "chanName" argument.
* | * generic/tclIORChan.c (ErrnoReturn): Replace the hardwiredandreas_kupries2009-10-071-2/+2
| | | | | | | | | | | | constant 11 with the proper errno define, EAGAIN. What was I thinking ? The BSD's have a different errno assignment and break with the hardwired number. Reported by emiliano on the chat.
* | * doc/refchan.n [Bug 2827000]: Extended the implementation ofandreas_kupries2009-08-061-4/+71
| | | | | | | | | | | | | | | | * generic/tclIORChan.c: reflective channels (TIP 219, method * tests/ioCmd.test: 'read'), enabling handlers to signal EAGAIN to indicate 'no data, but not at EOF either', and other system errors. Updated documentation, extended testsuite (New test cases iocmd*-23.{9,10}).
* | - eliminate some unnessary type castsnijtmans2009-02-101-2/+2
| | | | | | | | | | - some internal const decorations - spacing
* | minor formatting improvementsdkf2009-01-261-4/+5
| |
* | * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202].andreas_kupries2009-01-221-7/+12
| | | | | | | | | | | | | | * generic/tclIORTrans.c (ReflectClose): Closing a channel may supply NULL for the 'interp'. Test for finalization needs to be different, and one place has to pull the interp out of the channel instead.
* | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-31/+31
| | | | | | | | etc.)
* | Add "const" to many internalnijtmans2008-10-161-5/+5
| | | | | | | | | | const tables. No functional or API change.
* | * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leakandreas_kupries2008-07-031-1/+13
| | | | | | | | | | reported in [Bug 1987821]. Thanks to Miguel for the rpeort and Don Porter for tracking the cause down.
* | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-94/+103
| |
* | fix warningdas2008-04-251-2/+1
| |
* | * tests/ioCmd.test: Extended testsuite for reflected channelandreas_kupries2008-04-241-48/+334
| | | | | | | | | | | | | | | | | | | | implementation. Added test cases about how it handles if the rug is pulled out from under a channel (= killing threads, interpreters containing the tcl command for a channel, and channel sitting in a different interpreter/thread.) * generic/tclIORChan.c: Fixed the bugs exposed by the new testcases, redone most of the cleanup and exit handling.
* | * generic/tclIORChan.c (ReflectOutput): Allow zero return fromandreas_kupries2008-04-041-2/+13
| | | | | | | | | | | | | | | | write when input was zero-length anyway. Otherwise keept it an error, and separate the message from 'written too much'. * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed message.
* | * generic/tclIORChan.c (ReflectClose): Added missing removal ofandreas_kupries2008-04-041-1/+15
|/ | | | | | | | | the now closed channel from the reflection map. Before we could crash the system by invoking 'chan postevent' on a closed reflected channel, dereferencing the dangling pointer in the map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above.
* More stray trailing ","s.jenglish2008-02-261-2/+2
|
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclIORChan.c: Fixed a problem with reflectedandreas_kupries2007-11-241-10/+146
| | | | | | | | | | | | | | | | | | channels. 'chan postevent' is defined to work only from within the interpreter containing the handler command. Sensible, we want only handler commands to use it. It identifies the channel by handle. The channel moves to a different interpreter or thread. The interpreter containing the handler command doesn't know the channel any longer. 'chan postevent' fails, not finding the channel any longer. Uhm. Fixed by creating a second per-interpreter channel table, just for reflected channels, where each interpreter remembers for which reflected channels it has the handler command. This info does not move with the channel itself. The table is updated by 'chan create', and used by 'chan postevent'. * tests/ioCmd.test: Updated the testsuite.
* improvements to commentsdkf2007-11-191-39/+43
|
* * generic/tclIOCmd.c (Tcl_ReadObjCmd): Plugged a leak of theKevin B Kenny2007-04-241-1/+4
| | | | | | | | buffer object if the physocal read returned an error and the bypass area had no message. * generic/tclIORChan.c (TclChanCreateObjCmd): Plugged a leak of the return value from the "initialize" method of a channel handler.
* Plugged two memory leaksKevin B Kenny2007-04-231-3/+3
|