Tcl Source Code

Check-in [7aa743c0ee]
Login

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

Overview
Comment:Fix for Bug [97069ea11a]: Set return message in close if a flush error is reported (which may be an error from a background flush)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7aa743c0eecc149e125196d8d88409f3a0780734
User & Date: oehhar 2014-04-04 11:14:17
Original Comment: Set return message in close if a flush error is reported (which may be an error from a background flush)
References
2014-04-04
11:30 Closed ticket [97069ea11a]: close returns empty error message if failed non-blocking write flush pending plus 8 other changes artifact: dd0d02f48c user: oehhar
Context
2014-04-07
14:32
Merge-mark: Those two test-cases will arrive in trunk as soon as branch [http://core.tcl.tk/tcl/time... check-in: a006f5a452 user: jan.nijtmans tags: trunk
2014-04-04
11:14
Fix for Bug [97069ea11a]: Set return message in close if a flush error is reported (which may be an ... check-in: 7aa743c0ee user: oehhar tags: trunk
08:55
Fix for Bug [97069ea11a]: Set return message in close if a flush error is reported (which may be an ... check-in: 45d1b34648 user: oehhar tags: core-8-5-branch
2014-03-31
18:44
Add missing @TCL_LIB_FLAG@ to tcl.pc.in (derived from ticket [5bcb5026ad]) check-in: 85f74e89a1 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIO.c.

3266
3267
3268
3269
3270
3271
3272








3273


3274
3275
3276
3277
3278
3279
3280

    if (stickyError != 0) {
	Tcl_SetErrno(stickyError);
	if (interp != NULL) {
	    Tcl_SetObjResult(interp,
			     Tcl_NewStringObj(Tcl_PosixError(interp), -1));
	}








	flushcode = -1;


    }
    if ((flushcode != 0) || (result != 0)) {
	return TCL_ERROR;
    }
    return TCL_OK;
}
 







>
>
>
>
>
>
>
>
|
>
>







3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290

    if (stickyError != 0) {
	Tcl_SetErrno(stickyError);
	if (interp != NULL) {
	    Tcl_SetObjResult(interp,
			     Tcl_NewStringObj(Tcl_PosixError(interp), -1));
	}
	return TCL_ERROR;
    }
    /*
     * Bug 97069ea11a: set error message if a flush code is set and no error
     * message set up to now.
     */
    if (flushcode != 0 && interp != NULL
	    && 0 == Tcl_GetCharLength(Tcl_GetObjResult(interp)) ) {
	Tcl_SetErrno(flushcode);
	Tcl_SetObjResult(interp,
		Tcl_NewStringObj(Tcl_PosixError(interp), -1));
    }
    if ((flushcode != 0) || (result != 0)) {
	return TCL_ERROR;
    }
    return TCL_OK;
}