Skip to content
Tcl Source Code History Of Ticket 219045
Login

History Of Ticket 219045

Artifacts Associated With Ticket 219045

  1. Ticket change [87ba4e367a] (rid 131752) by nobody on 2000-10-26 01:09:51:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4112 Bug
      Version: 8.2.3
      SubmitDate: '2000-02-01'
      LastModified: '2000-02-07'
      Severity: CRIT
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Solaris
      OSVersion: Solaris 2.7
      Machine: Sun Ultra 30
      FixedDate: '2000-02-07'
      FixedInVersion: 8.3b1
      ClosedDate: '2000-10-25'
      
      
      Name:
      Stephan Voges
      
      CustomShell:
      We redefine the "puts" command.
      
      ObservedBehavior:
      We use Tcl 8.2.3 in a multithreaded application.  This application installs its own handler for SIGINT.  We observe that if the script contains an "exec" command, any Ctrl-C after the "exec" will cause a core dump.  Searching for the string "SIGINT" through the Tcl source, we found that in the file tclUnixPipe.c, there is a function RestoreSignals that sets the handler for SIGINT back to default.  If we modify this code to set it to our handler, the problem goes away.  We also noticed that RestoreSignals is called in a process spawned by vfork, which according to the man pages is not MT-safe.
      
      DesiredBehavior:
      Tcl shouldn't change our signal handlers.  If it needs to temporarily, or if something else might, it should save state and restore state afterwards.
      
      Patch:
      Diff output: note that this was just a hack, we declared our handler 
      30a31
      >  extern void my_handler (int sig);
      493c494
      <     signal(SIGINT, SIG_DFL);
      ---
      >     signal(SIGINT, my_handler);
      
      PatchFiles:
      tclUnixPipe.c
      
      
      
      This should be solved in 8.3, where we no longer attempt to use
      vfork at all due to reasons like the above.  Please tell us if
      that doesn't fix this particular case (it did solve other signal
      related issues with vfork). 
      -- 02/05/2000 hobbs
      User verified that 8.3b2 works as expected. 
      -- 02/07/2000 hobbs
      
    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:
      Core dumps on SIGINT in multithreaded application after retu
      
    11. type initialized to: "Bug"
  2. Ticket change [d2289063b0] (rid 113480) by welch on 2000-10-26 08:34:05:

    1. closedate changed to: "2000-10-26T01:34:05"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"