From: SourceForge.net <no...@so...> - 2003-07-30 22:03:32
|
Bugs item #780533, was opened at 2003-07-30 18:45 Message generated for change (Settings changed) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=780533&group_id=10894 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: miguel sofer (msofer) >Assigned to: Don Porter (dgp) Summary: [fcopy] callback sometimes fails to trigger Initial Comment: Assigned to dgp for review, as it might have something to do with [Bug 218203]). What I see is: let $s be a socket, $f a normal file, $nBytes a "large" number (8kB or above seems to trigger the error with good probability), both channels with "-translation binary". Then the trouble is that fcopy $s $f -size $nBytes -command myCallback often fails to notice that $nBytes *were* already written to $f, and hence never calls myCallback. It might be an off-by-one heisenbug: as I said, it happens often but not always - and it seems never to happen if one more byte than promised comes through the socket. I attached here a script that produces the error with good probability; uncommenting line 72 does the "one more byte" trick. The script attached below produces the following results on RH7.2 (relevant??): [mig@mini test2]$ /CVS/tcl_SF_clean/unix/tclsh test.tcl /CVS/tcl_SF_clean/unix/tclsh - 8.5a0 client: done sending server: copying 16384 bytes to tempFile client: won't wait anymore ... server: [fcopy] wanted 16384, and got 16384 server: [fcopy] doesn't tell us we are finished, exit anyway whereas the correct output (uncommenting line 72) is [mig@mini test2]$ /CVS/tcl_SF_clean/unix/tclsh test.tcl /CVS/tcl_SF_clean/unix/tclsh - 8.5a0 server: copying 16384 bytes to tempFile client: done sending server: copied 16384 bytes to tempFile. server: all done ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=780533&group_id=10894 |