Help for this page

Select Code to Download


  1. or download this
    how to handle database connection to a single database SQLite, or even
    + Pg, MySQL, from a possibly-forking program. Do I initiate the DB con
    +nection from each forked worker? Or can I share parent's DB handle am
    +ong the children/workers? The 1st option means that I connect/disconn
    +ect to the db each time a worker is spawned. How then is possible to 
    +keep a DB connection alive "for-ever"?
    
  2. or download this
    # run: hypnotoad myapp.pl
    # then (for 6 simultaneous clients)
    ...
    );
    print "$0 : started listening on port ${PORT} (pid $$) ...\n";
    $daemon->run;