Tcl Source Code

View Ticket
Login
Ticket UUID: 1025359
Title: No error propagation for wideSeekProc
Type: Bug Version: obsolete: 8.4.7
Submitter: andreas_kupries Created on: 2004-09-09 19:38:37
Subsystem: 25. Channel System Assigned To: dkf
Priority: 7 High Severity:
Status: Closed Last Modified: 2004-09-11 03:07:57
Resolution: Fixed Closed By: dkf
    Closed on: 2004-09-10 20:07:57
Description:
This applies to the head as well.
Given directly to Donal Fellows for review.

When the regular seekProc returns a negative location
the errorCode containing a more detailed POSIX error is
propagated to other parts of the core via Tcl_SetErrno().

This does not happen when a wideSeekProc is present and
used.

The relevant C code is Tcl_Seek in tclIO.h

8.4: Line 5553.
8.5: Line 5574.

Attached two patches (in a single tarball), for 8.4 and
8.5. The relevant code was moved out of the conditional
distinguishing between regular and wide seek procs, and
one branch has been changed to define 'result', as that
is now expected.
User Comments: dkf added on 2004-09-11 03:07:57:
Logged In: YES 
user_id=79902

Fixed in HEAD and 8.4 branch tip; thanks

andreas_kupries added on 2004-09-10 03:01:13:
Logged In: YES 
user_id=75003

See TIP http://tip.tcl.tk/91, which introduced the wideSeekProc.
I did not find a ref to the patch for it here on SF. The
ChangeLog reports integration at 5-May-2002, by DKF.

And see http://sourceforge.net/support/tracker.php?&aid=1025294
for the code which exposed this problem during the creation
of its testsuite.

Feel free to review that as well. It is a TIP in the making.

andreas_kupries added on 2004-09-10 02:38:38:

File Added - 100933: seek_patches.tar.gz

Attachments: