PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Alex Rolfe <arolfe at MIT dot EDU>
Subject: Re: Sybperl in a fork'ed process?
Date: May 20 1998 4:36PM

Forked connections aren't a good idea.  They work sometimes, but they
also give errors sometimes (as you have noted).  There are 2 ways around
this problem.  One is to open several database connections and give one
to each forked process, such that each process has its own.  The other
solution is to have some sort of daemon running in the background to do
this processing that you don't want to wait for.

 > BACKGROUND
 > I've got a process (a CGI script) which establishes a connection to a
 > DB, does some initial processing & DB access to give proper feedback to
 > the page viewer.  It also has to do some subsequent SQL to update some
 > records.  I don't want to make the web user wait for the subsequent
 > processing to take place, so I fork off a process.

 > 
 > QUESTION
 > What's the state of a connection that's been forked?