in reply to A per-instance shared queue among forked child processes?
I can't easily use normal (permanent) tables because multiple instances of the script will step all over each other.
Why not just use a permanent table that is associated with each child's process id?
my $pid = fork(); if (not defined $pid) { warn "resources not avilable.\n"; } elsif ($pid == 0) { print "Child: My PID is $$\n"; exit(0); } print "Parent: I talk to child by adding to QUEUE associated with $pid +\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A per-instance shared queue among forked child processes?
by EvanK (Chaplain) on Apr 04, 2011 at 19:57 UTC | |
by wind (Priest) on Apr 04, 2011 at 20:27 UTC |