Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: DBI, fork, and clone.

by qbxk (Friar)
on Jan 12, 2007 at 18:17 UTC ( #594427=note: print w/ replies, xml ) Need Help??

in reply to DBI, fork, and clone.

I ran into this problem just the other day. I had a time consuming database operation i wanted to happen right after a certain page call, but didn't want to make the client wait while i did it. So, fork, close STDOUT and STDERR and do my business. I remember when it dawned on me that the parent was outrunning the child to completion (as was my intention of course) and I'd lose the $dbh when it got there. After a brief affair with $dbh->clone() I decided to punt: just set a flag and made a cron job...

but maybe we'll go look at that again....

Thanks kyle!

It's not what you look like, when you're doin' what you’re doin'.
It's what you’re doin' when you’re doin' what you look like you’re doin'!
     - Charles Wright & the Watts 103rd Street Rhythm Band, Express yourself

Comment on Re: DBI, fork, and clone.
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://594427]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2015-11-25 13:31 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (675 votes), past polls