At 11:55 11/12/2000 -0500, barries wrote:
>I tested sharing fds beteen parent & child, but not dbms, and it breaks
>as expected.  sysseek() in one process alters the internals of the fd,
>tripping up the other process if it happens between seek and read.

I guess that's pretty much to be expected.

>I'm confused: how can one process' internal variables (the attribute set
>to 0 in the example snipped above) affect another process'?
>
>If this were the case, then any use of each() in forked children would
>be badly broken.  What am I missing?

I don't think that you're missing anything. I on the other hand was
probably missing much, much caffeine and some anti-cold medicine. If the
hash is truly shared then such problems will crop up, but as soon as it
goes to individual processes, unless the tied implementation somehow keeps
it's state elsewhere, no problem should occur. Maybe the problem would
occur in a threaded environment, but I haven't played with threads in Perl
and that's another question altogether. We'll see to that when mod_perl 2
comes out :)

Well, at least I hope that if there were people on the list that didn't
know how tied hashes worked and were curious about that they've learnt
something :)

-- robin b.
I'm not a complete idiot - some parts are missing! 

Reply via email to