Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 48c78758497974f59e5dfec1e2939356d6ba87e5
Ticket: 749639ffffffffffffffffffffffffffffffffff
exit fom child process hangs if --enable-threads set
User & Date: davidw on 2004-03-25 19:19:27
Changes

  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"