• Barry Warsaw's avatar
    Get rid of the differences between forking off the zeo server for NT · bc0fdca4
    Barry Warsaw authored
    and Unix.  We actually use the Windows code as the basis for the new
    approach so there's some hope that this will actually work on Windows
    <wink>.  Tim will verify once the checkins are finished.
    
    start_zeo_server(): Is now the blessed way of starting a ZEO server,
    and it primarily takes a ZConfig storage section string as its
    argument.  This it writes to a temp file and passes -C to the
    zeoserver.py script, which parses that temp file and creates the
    underlying storage.  zeoserver.py is responsible for deleting the temp
    file.
    
    zeoserver opens an `admin' port which is used to quit the server, but
    the protocol has been expanded slightly.  The first time the admin
    port is connected to, an ack character is sent from zeoserver.  This
    is necessary to coordinate the tests so that they are assured the
    server is running and responding before it tries to do more.
    Otherwise, some tests were vulnerable to timing bugs where the
    shutdown connect happened before the server was ready to accept them.
    
    The second connect exits the server process just like before.
    
    start_zeo_server() returns a 3-tuple.  The first element is the
    (host,port) tuple of the ZEO server, the second is the (host,port)
    tuple of the admin socket, and the third is the pid of the spawned
    child process.
    
    shutdown_zeo_server(): The blessed way to shut down a zeoserver.py
    process.  Takes an admin (host,port) tuple, connects to that and
    writes a log entry.
    bc0fdca4
forker.py 3.25 KB