in reply to Re^2: Embperl/Apache::Session and forking
in thread Embperl/Apache::Session and forking

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.
  • Comment on Re^3: Embperl/Apache::Session and forking

Replies are listed 'Best First'.
Re^4: Embperl/Apache::Session and forking
by devnul (Monk) on Jul 21, 2004 at 22:59 UTC
    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
      Well, like I said, you can close it and re-open it in the child process. Which Apache::Session subclass are you using?

      Assuming this is not a brand-new session, you can mark it unmodified by changing the status field. Look at the Apache::Session source code to see how it's done.