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

History Of Ticket 749639ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 749639ffffffffffffffffffffffffffffffffff

  1. Ticket change [6ee765099b] (rid 100219) by dizzi on 2003-06-05 16:31:15:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When compiled with --enable-threads Tcl8.4.3 doesn't handle
      correctly the exit from child processes created with
      fork if they
      don't execl some other program.
      
      The problem is explained in detail in this bug report
      against TclX
      that I filed yesterday, which seems in fact a Tcl8.4 bug:
      
      http://sourceforge.net/tracker/index.php?func=detail&aid=748835&group_id=13247&atid=113247
      
      The problem seems to be that when the child process
      exits without
      executing another program it sends a 'q' message to a
      notifier
      process that belongs to its parent. The child then
      waits for some
      signal from the parent that is never sent and hangs
      forever.
      
      It is true that Tcl doesn't have the fork and execl
      commands, but
      these commands are provided by the TclX extension and they
      can't work correctly because of a bug in the Tcl exit code.
      
      The patch in attachment seems to fix the problem, but
      since I don't
      really know how the threaded notifier works it may be
      wrong.
      
      My solution simply does nothing in
      Tcl_FinalizeNotifier() if the
      current process is not the one which created the
      notifier thread.
      In this way the notifier thread can be terminated only
      by its parent
      and child processes should be able to exit without
      interfering with
      the parent threads.
      
      -- 
      Massimo Dal Zotto <[email protected]>
      
      
    4. foundin initialized to: "obsolete: 8.4.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dizzi"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to:
      exit fom child process hangs if --enable-threads set
      
    11. type initialized to: "Bug"
  2. Add attachment "unix-notify.patch" [efdc5deca0] (rid 109072) by dizzi on 2003-06-05 23:31:15.

  3. Ticket change [9096ee85f4] (rid 120477) by dizzi on 2003-06-05 23:31:15:

    1. icomment:
      
      
      File Added - 52276: unix-notify.patch
      
      
      
    2. login: "dizzi"
    3. mimetype: "text/plain"
    4. username: "dizzi"
  4. Ticket change [80e7aae7cb] (rid 116949) by gnepp on 2003-07-02 05:22:28:

    1. icomment:
      Logged In: YES 
      user_id=698369
      
      I think this is slightly wrong --
          Tcl_ConditionFinalize(&(tsdPtr->waitCV));
      is no longer called in the child process but still needs to be.
      
      An alternative patch would be to set notifierCount = 0 post-
      fork in the child, using a pthread_atfork() handler, but I don't 
      know how portable that is.
      
      Andrei
      
      
    2. login: "gnepp"
    3. mimetype: "text/plain"
    4. username: "gnepp"
  5. Ticket change [6e1f38adc0] (rid 128822) by hobbs on 2003-10-14 02:20:36:

    1. priority changed to: "8"
  6. Ticket change [48c7875849] (rid 99954) by davidw on 2004-03-25 19:19:27:

    1. icomment:
      Logged In: YES 
      user_id=240
      
      Jeff Hobbs created a patch which uses pthread_atfork, which
      is really what needs to happen.  The patch locks all the
      mutexes before forking, then unlocks them in both the parent
      and child afterwards.
      
      I have cleaned up the patch just a bit, added 2 test
      commands (testfork and testwaitpid), and a couple of basic
      tests.
      
      One modification to the patch that needs more thinking is
      how to expose the atfork stuff to Tcl.  For starters, I have
      created two functions, one that is called in the parent, the
      other in the child.  Otherwise, there seems to be no way of
      knowing which you are running in, and that information might
      be necessary at some point.
      
      
    2. login: "davidw"
    3. mimetype: "text/plain"
    4. username: "davidw"
  7. Ticket change [35531c0bf2] (rid 106903) by davidw on 2004-03-25 19:26:41:

    1. icomment:
      Logged In: YES 
      user_id=240
      
      Since it's apparently not possible to actually attach a
      patch, it is located at:
      
      http://sourceforge.net/tracker/index.php?func=detail&aid=923072&group_id=10894&atid=310894
      
      
      
      
    2. login: "davidw"
    3. mimetype: "text/plain"
    4. username: "davidw"
  8. Ticket change [d4257da899] (rid 123402) by ferrieux on 2011-09-24 05:11:25:

    1. closedate changed to: "2011-09-23T22:11:25"
    2. closer changed to: "ferrieux"
    3. icomment:
      Wiped out by the 2001201 quick exit reform.
      
      
    4. login: "ferrieux"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "ferrieux"