Skip to content
Tcl Source Code History Of Ticket 219301
Login

History Of Ticket 219301

Artifacts Associated With Ticket 219301

  1. Ticket change [dee0c49586] (rid 114924) by nobody on 2000-10-26 05:10:22:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2660 Bug
      Version: 8.2
      SubmitDate: '1999-08-31'
      LastModified: '1999-12-03'
      Severity: SER
      Status: UnAssn
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Solaris
      OSVersion: 2.6
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Michael Santos
      
      Extensions:
      BLT 2.4i (but not required for above)
      
      Comments:
      I have had similar problems in programs using Tcl_DoOneEvent().  In this
          case, the connection is established correctly (ConnectPort() is called),
          but subsequent communication is impossible.  The server seems to ignore
          communication on the channel even though Tcl_CreateChannelHandler was
          used to setup a callback.  This latter problem seems to only happen when
          Tcl 8.2 is compiled with threads support.  Disabling thread support
          seemed to restore the correct behavior.  If I can adapt the test program
          for this case, I will submit another bug report.
      
      ReproducibleScript:
      When opening a TCP server socket and using Tcl_Main in an interactive
          application, connections will be ignored unless "update" or "update
          idletasks" is explicitly invoked on the command line.
          
          Below is a simple C file to illustrate.  Connecting to the specified
          port with some other program will not generate the message in
          ConnectPort() until you invoke update on the command line.
          
          #include <stdio.h>
          #include <tcl.h>
          
          Tcl_Interp *gInterp;
          
          void 
          ConnectPort(ClientData clientData, Tcl_Channel new_socket,
              char *hostName, int port) {
            fprintf(stderr, "ConnectPort() called with hostname %s, port %d\n",
            hostName, port);
          
            Tcl_Close(gInterp, new_socket);
          }
          
          
          void
          StartServer(ClientData clientData) {
            Tcl_Channel socket;
            fprintf(stderr, "StartServer() called.\n");
            socket = 
              Tcl_OpenTcpServer(gInterp, 50099, NULL, 
                ConnectPort, (ClientData)NULL);
            if (!socket) {
              Tcl_Exit(1);
            }
          }
          
          
          int 
          Tcl_AppInit(Tcl_Interp *interp) {
            gInterp = interp;
            if (Tcl_Init(interp) != TCL_OK) {
              fprintf(stderr, "Tcl failed to initialize.\n");
              Tcl_Exit(1);
            }
          
            StartServer(NULL);
          
            return TCL_OK;
          }
          
          
          int 
          main(int argc, char *argv[]) {
            Tcl_Main(argc, argv, Tcl_AppInit);
          
            return 0;
          }
      
      ObservedBehavior:
      As mentioned above, connecting to the server socket will not result in a
          call to ConnectSocket() until "update" is entered on the command line of
          the server process.
      
      DesiredBehavior:
      I expect to see the behavior of 8.0.5 (and previous versions -- haven't
          ever tried 8.1).  With 8.0.5, the server program will print the
          ConnectPort() message immediately upon connecting to the port from
          another program.  No update call is needed to trigger it.
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to:
      Tcl_Main misses file events unless "update" is explicitly ca
      
    11. type initialized to: "Bug"
  2. Ticket change [7224610e24] (rid 100808) by hobbs on 2002-03-23 05:08:17:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      see also 219302.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. title changed to:
      Tcl_Main misses file events unless "update" is explicitly ca
      
    5. username: "hobbs"
  3. Ticket change [f1287b296d] (rid 109316) by dkf on 2002-04-27 05:50:05:

    1. assignee changed to: "andreas_kupries"
    2. title changed to:
      Tcl_Main misses file events unless [update] is explicitly ca
      
  4. Ticket change [e095d70719] (rid 115224) by dgp on 2002-10-22 20:18:05:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Is this solved now with the avilability of
      Tcl_SetMainLoop() ?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [e526ceb6ea] (rid 88084) by dgp on 2003-10-03 06:19:41:

    1. priority changed to: "8"
  6. Ticket change [5c711b66e6] (rid 115300) by andreas_kupries on 2003-10-23 03:47:32:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      I have no idea. The example is so short, possibly even 
      incomplete. For example it has no call of Tcl_FindExecutable.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Ticket change [eaf27bc73a] (rid 103453) by dgp on 2003-10-23 06:06:47:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      If not for the reference to
      Tcl Bug 219302 as a
      Duplicate, I'd close this
      one as Out of Date.
      
      Does that report more clearly
      point out what the real issue
      is (and whether we've already
      solved it)?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [de689f0802] (rid 114844) by andreas_kupries on 2004-10-29 02:41:30:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      The other bug mentions SSH and X11 port forwarding, this one
      does not.. Beyond that the two report truly look the same,
      i.e. the other is no more clear than this one.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Ticket change [8a48605ce0] (rid 127365) by davygrvy on 2004-11-12 08:02:23:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      1) fprintf(stderr,...) is buffered according to however the
      system decides.  If instead, you used
      Tcl_Write(Tcl_GetStdChannel(TCL_STDERR),...), the buffer is
      managed by Tcl, and is also more cross-platform.
      
      2) To churn the event loop in Tcl, one must actually churn
      it.  Normally, the interactive shell is blocked on the stdin
      channel get'ing something.  One can setup the shell for
      async mode on stdin.  tclhttpd does this.
      
      If this had worked before, it might have been an odd fringe
      effect.
      
      This bug should be closed as it isn't a blocking Tcl_Gets
      responsibility to churn the event loop.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  10. Ticket change [6d36b8a778] (rid 128652) by dkf on 2004-11-23 18:18:17:

    1. closedate changed to: "2004-11-23T11:18:17"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      As stated elsewhere, this is Pilot Error.  Closing...
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "dkf"