Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c23a6b87989cd00847520833564b30580c7365aa
Ticket: 219006ffffffffffffffffffffffffffffffffff
tcl with threads will not exit
User & Date: nobody on 2000-10-26 01:09:14
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3871 Bug
    Version: 8.2
    SubmitDate: '1999-12-13'
    LastModified: '2000-04-25'
    Severity: CRIT
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    RelatedBugIDs: 3414 4139
    OS: Solaris
    OSVersion: Solaris 2.5.1 , 2.6 , 2.7
    FixedDate: '2000-04-25'
    FixedInVersion: 8.3.1
    ClosedDate: '2000-10-25'
    
    
    Name:
    Amit Khivesara
    
    ReproducibleScript:
    In a tcl program if we do a ::system("") command which
    starts a child which is run in the background.
    e.g .::system("tail -f /etc/passwd&").
    
    The program will not exit since the Notify Thread will not come out of the select in tclUnixNotify.c
    
    ObservedBehavior:
    This is because the pipe is closed by the other thread
    but the fork of the child in ::system still has the file
    descripter open.
    
    DesiredBehavior:
    It should exit.
    
    PatchFiles:
    The bug is in tclUnixNotify.c in method NotifierThreadProc.
        The fds should be FD_CLOEXEC.
    
        i.e. 
           if (pipe(fds) != 0) {
            panic("NotifierThreadProc: could not create trigger pipe.");
            }
        /** Lines added are for BUG!!!*/
            fcntl(fds[0],F_SETFD,FD_CLOEXEC);
            fcntl(fds[1],F_SETFD,FD_CLOEXEC);
    
    
    
    This is the same problem as was noted in 4139, fixed with different
    fix (sending 'q' through triggerPipe). 
    -- 04/25/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "49. Threading"
  10. title changed to: "tcl with threads will not exit"
  11. type changed to: "Bug"