Re: fork()ing in perl

2003-07-21 Thread David Cantrell
On Monday, July 21, 2003 2:46 pm +0100 Nicholas Clark <[EMAIL PROTECTED]> wrote: On Mon, Jul 21, 2003 at 02:27:48PM +0100, Matthew Lawrence wrote: I might be getting the wrong end of the stick about this, but is it possible that undefing a bunch of stuff in child processes will actually increase th

Re: fork()ing in perl

2003-07-21 Thread Nicholas Clark
On Mon, Jul 21, 2003 at 02:27:48PM +0100, Matthew Lawrence wrote: > I might be getting the wrong end of the stick about this, but is it > possible that undefing a bunch of stuff in child processes will actually > increase the system footprint since the newly undefined data would > differ from th

Re: fork()ing in perl

2003-07-21 Thread Matthew Lawrence
Niklas Nordebo wrote: On Fri, Jul 18, 2003 at 02:45:29PM +0100, Iain Tatch wrote: CW> 1. what's happening Perl is doing nothing more than calling your operating system's underlying fork() call -- see `man 2 fork'. Do that, and on Linux you'll see this: Under Linux, fork is imple

Re: fork()ing in perl

2003-07-18 Thread muppet
Dominic Mitchell said: > Your best bet is probably to try and split the program into two. One to > fetch the data and another to process each chunk of data. Of course, > you'll then have to invent a method of passing that chunk of data > around[2]. there are tons of ways to do this... streams o

Re: fork()ing in perl

2003-07-18 Thread Paul Mison
On 18/07/2003 at 14:28 +0100, Chisel Wright wrote: I've got a colleague here in the orifice, and between us we know how to use fork() but don't understand it as well as we'd like. The [EMAIL PROTECTED] list just had a fairly long thread about threading, (lazy) forking and Perl. You may find it use

Re: fork()ing in perl

2003-07-18 Thread Dan Brook
> 'undef'ining variables is irrelevant, as that simply marks the memory > they were using as "available for the current process (ie perl) to > overwrite". The operating system won't reclaim that memory until your > program exits. This isn't a feature of perl, it's a feature of most > (all?) common

Re: fork()ing in perl

2003-07-18 Thread Niklas Nordebo
On Fri, Jul 18, 2003 at 02:45:29PM +0100, Iain Tatch wrote: > CW> 1. what's happening > > Perl is doing nothing more than calling your operating system's underlying > fork() call -- see `man 2 fork'. Do that, and on Linux you'll see this: Under Linux, fork is implemented using copy-on-wr

Re: fork()ing in perl

2003-07-18 Thread Dominic Mitchell
On Fri, 18 Jul 2003 14:28:20 +0100, Chisel Wright <[EMAIL PROTECTED]> wrote: > I've got a colleague here in the orifice, and between us we know how to > use fork() but don't understand it as well as we'd like. > > There's a parent process that does a nice chunky select from a database, > does othe

Re: fork()ing in perl

2003-07-18 Thread Iain Tatch
On Friday, July 18, 2003, 2:28:20 PM, Chisel Wright wrote: CW> I've got a colleague here in the orifice, and between us we know how to CW> use fork() but don't understand it as well as we'd like. CW> Can anyone out there explain: Assuming you're using a unix-esque operating system: CW> 1. what'

Re: fork()ing in perl

2003-07-18 Thread Shevek
On Fri, 18 Jul 2003, Chisel Wright wrote: > There's a parent process that does a nice chunky select from a database, > does other bits and pieces, and becomes a large process (around 70Mb). > > Then it forks off little kiddie processes. These all seem to have the > same size/footprint as the pare

fork()ing in perl

2003-07-18 Thread Chisel Wright
I've got a colleague here in the orifice, and between us we know how to use fork() but don't understand it as well as we'd like. There's a parent process that does a nice chunky select from a database, does other bits and pieces, and becomes a large process (around 70Mb). Then it forks off little