Skip to content
Tcl Source Code History Of Ticket 219251ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 219251ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 219251ffffffffffffffffffffffffffffffffff

  1. Ticket change [c44eb2270a] (rid 111827) by nobody on 2000-10-26 05:04:10:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 5758 Bug
      Version: 8.2.3
      SubmitDate: '2000-05-31'
      LastModified: '2000-07-25'
      Severity: MED
      Status: Assigned
      Submitter: techsupp
      ChangedBy: davidg
      RelatedBugIDs: 5791
      OS: Solaris
      OSVersion: SunOS 5.6 Generic_105181-16
      Machine: sun4u sparc
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Ben Vitale
      
      
      Extensions:
      
      Tclx 8.2
      
      
      Comments:
      
      this patch is only a start.  it won't work if there aren't any fileevent
      
          handlers registered, because 'waitingList' will
      
          be empty.  Also, TclX is quite clear the 'the first interp to check
      
          Tcl_AsyncReady' will run all the handlers.  I'm
      
          OK with this, I guess, but the callback script might fail if it
      
          consisted of 'foo' and proc foo {} was defined in one
      
          interp, but not the interp running the handler.
      
      
          ideally TclX could inform the notifier which interps were interested in
      
          which signals (at most one interp, say,
      
          the last one to register a given signal, could handle a given signal).
      
          A data structure looking something like
      
      
          Tcl_Interp *signal_interps [SIGMAX];
      
      
          might help.  This could be used by the notifier to know that each of
      
          these interps should be added to the waiting
      
          list.  And it could be used by Tcl X so that a given signal runs in the
      
          right interp.
      
      
          is there any effort to use sigprocmask to ensure that only the notifier
      
          thread gets signals?
      
      
      ReproducibleScript:
      
      #!./tclsh
      
      
      package require Tclx
      
      
      proc foo {} {
      
        puts "bye"
      
        exit
      
      }
      
      
      # even with my patch, if you take out this line, things break
      
      set s [socket -server {puts foo} 0]
      
      
      signal trap INT {foo}
      
      vwait forever
      
      
      # run this script from a shell.  type ^C or run kill -INT etc.
      
      
      ObservedBehavior:
      
      ^C does not interrupt the script, or stop it, or run the proc foo{} etc.
      
      
      DesiredBehavior:
      
      when the process running the script gets SIGINT, it should run my signal handler, proc foo{}
      
      
      Patch:
      
      --- tclUnixNotfy.c      2000/01/26 19:14:13     1.1.1.2
      
      +++ tclUnixNotfy.c      2000/05/27 06:46:33     1.2
      
      @@ -11,7 +11,7 @@
      
        * See the file "license.terms" for information on usage and redistribution
      
        * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
      
        *
      
      - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.1.1.2 2000/01/26 19:14:13 ben Exp $
      
      + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.2 2000/05/27 06:46:33 ben Exp $
      
        */
      
      
       #include "tclInt.h"
      
      @@ -897,6 +897,8 @@
      
            */
      
      
           while (1) {
      
      +      int async_ready = 0;
      
      +
      
              /*
      
               * Set up the select mask to include the receive pipe.
      
               */
      
      @@ -941,6 +943,9 @@
      
                   * Try again immediately on an error.
      
                   */
      
      
      +         if (errno == EINTR && Tcl_AsyncReady ())
      
      +           async_ready = 1;
      
      +         else
      
                  continue;
      
               }
      
      
      @@ -957,7 +962,8 @@
      
                       found |= word;
      
                       (((long*)(tsdPtr->readyMasks))[i]) = word;
      
                  }
      
      -            if (found || (tsdPtr->pollState & POLL_DONE)) {
      
      +            if (found || (tsdPtr->pollState & POLL_DONE) || async_ready) {
      
      +               async_ready = 0;
      
                       tsdPtr->eventReady = 1;
      
                      Tcl_ConditionNotify(&tsdPtr->waitCV);
      
                      if (tsdPtr->onList) {
      
      
      PatchFiles:
      
      tclUnixNotfy.c
      
      
      
      
      TR#5791 might be related to this.  generic/tclAsync.c is very broken under threads already and it might be better to fix it first. 
      -- 07/19/2000 davidg
      
      tclAsync.c is now fixed in the mainline CVS code.  Is TclX built against this working properly now? 
      -- 07/25/2000 davidg
      
      
      
    4. foundin initialized to: "final: 8.2.3"
    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: "TclX signals do not interrupt Threaded notifier"
    11. type initialized to: "Bug"
  2. Ticket change [fb4815584a] (rid 92029) by davygrvy on 2001-04-26 07:28:45:

    1. assignee changed to: "davygrvy"
    2. closedate changed to: "2001-04-26T00:28:45"
    3. closer changed to: "davygrvy"
    4. icomment:
      Logged In: YES 
      user_id=7549
      
      Tcl_AsyncMark() now calls Tcl_ThreadAlert() [awakes a 
      sleepy notifier] as of 8.4a2, if TclX is still broken, it's 
      a TclX issue.
      
      
      
    5. login: "davygrvy"
    6. mimetype: "text/plain"
    7. resolution changed to: "Rejected"
    8. status changed to: "Closed"
    9. username: "davygrvy"