Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Embperl/Apache::Session and forking

by perrin (Chancellor)
on Jul 21, 2004 at 20:58 UTC ( #376381=note: print w/replies, xml ) Need Help??

in reply to Embperl/Apache::Session and forking

Unless you modify the session data, it will not try to save it.
  • Comment on Re: Embperl/Apache::Session and forking

Replies are listed 'Best First'.
Re^2: Embperl/Apache::Session and forking
by devnul (Monk) on Jul 21, 2004 at 21:23 UTC
    Right.. But at the point the child is forked it could be in a state where it "thinks it outta be saved", so then both the parent and child will attempt to do so during perl_destruct, right?....

    If the parent takes longer to finish than the child(and the call succeeds) this would indicate the session would now contain old data from the child....

    - Greg
      There are various things you could do. You could copy the session data into a hash and close the session before forking. You could mark the session as unchanged so it doesn't save. You'd probably need to release locks if you are using locking. You could also just close the session before you fork and re-open it afterward, but I'd suggest turning off the session locking if you do that.
        I can't really close the session because there are things in the child which might need to get access to variables stored within it...

        Do you have any specific things I can do in the child to declare the session is not stale (even if it is) so that it won't try to save it?... I've tried several things but can't get any of them to work...

        - Greg

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-05-23 17:44 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.