Skip to content
Tcl Source Code History Of Ticket 1350564fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1350564fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1350564fffffffffffffffffffffffffffffffff

  1. Ticket change [54457aba06] (rid 93919) by setok on 2005-11-07 18:05:33:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      If I am doing an [fcopy] from chan1 to chan2 I cannot use a 
      readable fileevent for chan1. This is completely understandable, 
      but why does it not work the other way round? I would like to copy 
      data from chan1 but also react to any responses coming from 
      chan2 as soon as they arrive. However, this is not possible. 
      Neither is setting a writable fileevent for chan1.
      
    4. foundin initialized to: "obsolete: 8.4.11"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "setok"
    9. subsystem initialized to: "25. Channel System"
    10. title initialized to: "Inadequate fcopy operation"
    11. type initialized to: "Bug"
  2. Ticket change [42e1d39fcb] (rid 116448) by coldstore on 2005-11-22 14:30:55:

    1. icomment:
      Logged In: YES 
      user_id=19214
      
      I'm not sure I follow ... the following code seems to work
      as I would expect it to, in a recent 8.5 - regardless of
      whether the [fileevent] occurs before or after the [fcopy].
      
      Is the problem that a readable event won't trigger while the
      [fcopy] is active (that is, before Done is called?)
      
      proc readable {sock} {
          puts stderr "R: [gets $sock]"
      }
      
      proc done {args} {
          puts stderr "DONE: $args"
      }
      
      proc accept {sock args} {
          puts stderr "accept $args"
          set fd [open fcopy-socket.tcl r]
          fcopy $fd $sock -command done
          fileevent $sock readable [list readable $sock]
      }
      
      socket -server accept 9999
      
      vwait forever
      
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  3. Ticket change [bb94208a9d] (rid 129510) by setok on 2005-11-23 18:24:27:

    1. icomment:
      Logged In: YES 
      user_id=137542
      
      The manpage clearly states that no IO can be done with either channel. 
      Presumably that would include reading from the outChan. In fact, I have seen 
      this occur where I get something like a "channel is busy" error. I am not sure if 
      your example is good for testing this as in such a small case it will likely have 
      written out all data before the fileevent is triggered.
      
      
    2. login: "setok"
    3. mimetype: "text/plain"
    4. username: "setok"
  4. Ticket change [9dda51d46b] (rid 96383) by ferrieux on 2008-04-05 05:36:39:

    1. icomment:
      Logged In: YES 
      user_id=496139
      Originator: NO
      
      Fixed.
      
      Attaching a patch (including the two other recent fixes to fcopy) refining the blindly symmetrical busy test (non-null csPtr) by a direction-specific one.
      The refined test is:
      
       #define BUSY_STATE(st,fl) \
          ((st)->csPtr && \
           ( (((fl)&TCL_READABLE)&&((st)->csPtr->readPtr==(st)->topChanPtr)) || \
             (((fl)&TCL_WRITABLE)&&((st)->csPtr->writePtr==(st)->topChanPtr))))
      
      Also attaching 4 test scripts:
       - fev[12].tcl: run in two separate tclsh's, use an async fcopy and a reverse fileevent readable.
       - inetc.tcl,noria.tcl: run in three tclsh's: one noria and two inetcs, this establishes a bidirectional fcopy: anything typed into one inetc is displayed on the other one and vice versa.
      
      Last minute: heck, I cannot attach any files since I'm not the reporter ! What can I do ?
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  5. Ticket change [b026c5dd85] (rid 97929) by andreas_kupries on 2008-04-05 05:44:52:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Send them to me and I as maintainer should be able to attach them.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Add attachment "fcopy-dual.tar.gz" [e9a234492a] (rid 104848) by andreas_kupries on 2008-04-05 05:57:04.

  7. Ticket change [53acf80292] (rid 93798) by andreas_kupries on 2008-04-05 05:57:05:

    1. icomment:
      
      
      File Added - 273293: fcopy-dual.tar.gz
      
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      File Added: fcopy-dual.tar.gz
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  8. Ticket change [3b35ca665a] (rid 112698) by andreas_kupries on 2008-04-05 06:03:44:

    1. priority changed to: "9 Immediate"
  9. Ticket change [c800f35f1b] (rid 122034) by dgp on 2008-04-05 11:47:15:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      let's just add ferrieux
      to the Developers list so
      he can attach patches.
      
      If his worthy contributions
      keep up, a maintainer hat
      for him may be in the mail.
      :)
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [fcf52cd172] (rid 108329) by andreas_kupries on 2008-04-07 22:44:10:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      True that.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  11. Ticket change [1003d22faa] (rid 94890) by andreas_kupries on 2008-04-08 02:44:56:

    1. closedate changed to: "2008-04-07T19:44:56"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Functionality committed to 8.4, 8.5, and head branches.
      Test case will follow.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"
  12. Ticket change [56f925ab6a] (rid 94414) by andreas_kupries on 2008-04-08 02:50:09:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      And Alexandre is now on the developer's list for Tcl, currently only for 'Tracker Admin'. That should allow him to attach patches to other tracker item than his own.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  13. Ticket change [f23b262b2c] (rid 137786) by mi on 2014-04-28 19:11:13:

    1. assignee changed to: "aku"
    2. closedate changed to: "2456776.29946007"
    3. closer changed to: "mi"
    4. comment changed to:
      If I am doing an [fcopy] from chan1 to chan2 I cannot use a 
      readable fileevent for chan1. This is completely understandable, 
      but why does it not work the other way round? I would like to copy 
      data from chan1 but also react to any responses coming from 
      chan2 as soon as they arrive. However, this is not possible. 
      Neither is setting a writable fileevent for chan1.
      
    5. icomment:
      <p align="justify">Though the fix (improvement) was committed into Tcl C-code, the documentation was never updated. The man-page for <tt>fcopy(n)</tt> still states:
      <blockquote>You are not allowed to do other I/O operations with inchan or outchan during a background fcopy.</blockquote>
      <p align="justify">The above sentence should be clarified and an example of bi-directional fcopy be added.
      <p align="justify">BTW, can I multiplex a single source into multiple destinations with fcopy (as <tt>tee(1)</tt> would do)? Should I be able to?
      
    6. login: "mi"
    7. mimetype: "text/html"
    8. severity changed to: "Minor"
  14. Ticket change [d4b0924421] (rid 137788) by ferrieux on 2014-04-28 20:10:44:

    1. closedate changed to: "2456776.34079354"
    2. closer changed to: "ferrieux"
    3. icomment:
      > BTW, can I multiplex a single source into
      > multiple destinations with fcopy (as tee(1)
      > would do)? Should I be able to?
      
      Not "out of the box", because async fcopy is a simple-minded "byte noria", that essentially spends its life alternating a readable and a writable fileevent (in C), guaranteeing no accumulation in memory. The noria requires to be alone fiddling with fileevents in that direction, otherwise there would be a race on the read side.
      
      If instead you want to "fork the flow", simply do a single fcopy towards a synthetic channel (refchan) that duplicates.
      
    4. login: "ferrieux"
    5. mimetype: "text/plain"
  15. Ticket change [92349c570f] (rid 137792) by ferrieux on 2014-04-28 20:34:20:

    1. closedate changed to: "2456776.35718634"
    2. icomment:
      Committed a clarification to fcopy.n [check-in a6e8d5d50c]. Thanks for feedback.
      
    3. login: "ferrieux"
    4. mimetype: "text/plain"