Tcl Source Code

Check-in [83c38b0c0d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Take two. Don't forget to apply all patches, even when the phone rings in between.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-398-impl
Files: files | file ages | folders
SHA1: 83c38b0c0de6a05d575232753ab9969afae27667
User & Date: ferrieux 2012-03-22 08:04:09
Context
2012-03-22
21:57
merge trunk (fix OSX build error) check-in: c63f1e426a user: jan.nijtmans tags: tip-398-impl
08:04
Take two. Don't forget to apply all patches, even when the phone rings in between. check-in: 83c38b0c0d user: ferrieux tags: tip-398-impl
07:33
Implement tip 398 : Quickly Exit with Non-Blocking Blocked Channels. This is simply a revert of the ... check-in: f2a0a1891c user: ferrieux tags: tip-398-impl
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIO.c.

423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443

	/*
	 * We've found a live channel. Close it.
	 */

	if (active) {
	    /*
	     * Set the channel back into blocking mode to ensure that we wait
	     * for all data to flush out.
	     */

	    (void) Tcl_SetChannelOption(NULL, (Tcl_Channel) chanPtr,
		    "-blocking", "on");

	    if ((chanPtr == (Channel *) tsdPtr->stdinChannel) ||
		    (chanPtr == (Channel *) tsdPtr->stdoutChannel) ||
		    (chanPtr == (Channel *) tsdPtr->stderrChannel)) {
		/*
		 * Decrement the refcount which was earlier artificially
		 * bumped up to keep the channel from being closed.
		 */







|
<


<
<
<







423
424
425
426
427
428
429
430

431
432



433
434
435
436
437
438
439

	/*
	 * We've found a live channel. Close it.
	 */

	if (active) {
	    /*
	     * TIP #398: we no longer set the channel back into blocking mode

	     */




	    if ((chanPtr == (Channel *) tsdPtr->stdinChannel) ||
		    (chanPtr == (Channel *) tsdPtr->stdoutChannel) ||
		    (chanPtr == (Channel *) tsdPtr->stderrChannel)) {
		/*
		 * Decrement the refcount which was earlier artificially
		 * bumped up to keep the channel from being closed.
		 */