Table of Contents

Module: zdaemon Zope-2.2.1-src/lib/python/zdaemon.py

zinit, slightly smarter server manager and ZServer startup script.

zinit will:

  • Fork a parent and a child

  • restart the child if it dies

  • write a pid file so you can kill (the parent)

  • reports the childs pid to stdout so you can kill that too

TODO

  • Have the parent reap the children when it dies

  • etc.

Imported modules   
import os
import posix
import signal
import sys
import time
import zLOG
Functions   
forkit
heartbeat
main
pstamp
run
  forkit 
forkit ( attempts=FORK_ATTEMPTS )

  heartbeat 
heartbeat ()

  main 
main ()

  pstamp 
pstamp ( message,  sev )

this is a bit of a hack so I dont have to change too much code

  run 
run ( argv,  pidfile='' )

Exceptions   
ForkError
KidDiedOnMeError
Classes   
ExecError
ForkError
KidDiedOnMeError

Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6