[Gllug] Sharing hash

Ian Norton bredroll at atari.org
Wed Apr 16 09:49:25 UTC 2003


yes, the hash is created before i fork, but i want the changes in the hash made
by the children to be retained when the child dies,

Just in case you wonder what i'm up to, I am writing a database server in perl,
(very simple one with a limited yet useful command system)

http://gwi.darkspace.org.uk

It is called 'NSQL' (not sql)

Ian

On Wed, Apr 16, 2003 at 10:06:46AM +0100, Simon Stewart wrote:
> On Monday 14 April 2003 1:09 pm, Ian Norton wrote:
> > i have process that i need to fork and a hash that i want to share between
> > the children...
> 
> Why not create the hash before forking the children? Then they'd all have a 
> copy of it. You might also want to open two pipes before forking, and use one 
> to send data to the parent process, and the other to send data to the child 
> process, but I'm not sure how feasible that is (are file descriptors also 
> duplicated? I guess so)
> 
> Cheers,
> 
> Simon
> 
> -- 
> Gllug mailing list  -  Gllug at linux.co.uk
> http://list.ftech.net/mailman/listinfo/gllug

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS dpu s--: a-- C++++ UL++ P+++ L+++ E--- W-- N+ o K w---
O M-- V-- PS++ PE-- Y+ PGP+ t+++ 5++ X++ R+++ !tv b DI D----
G++ e+ h++ r++ y+++
------END GEEK CODE BLOCK------
----- Message of the Hour ------
Moooo :-)

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list