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: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Sybperl in a fork'ed process?
Date: May 20 1998 5:02PM

Tim Holt writes:
 > 
 > QUESTION
 > What's the state of a connection that's been forked?  Here's a code
 > sample.  Sybperl is "under" a module I use.

The way things are written right now the connection gets closed when
the process that opened it exits. I realize (now) that this may not be 
optimal, but there is a way to fool sybperl into NOT closing a
connection when it exits by setting the __PID__ attribute to be
different from the running process ID. It's a little clumsy, but it
should work for you: in the parent process, do $dbh->{__PID__} =
some_random_number_that_is_not_$$ and you should be fine.

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com