[CLUE-Tech] PERL Q

David Anselmi anselmi at intradenver.net
Sun Jun 3 21:30:41 MDT 2001


Ok, I understand.  It does look like recursion is what you want (but it isn't
exactly infinite in this case).  Pretty neat program.

I should have said yesterday, if you want asynchronous processing (multiple
processes at the same time), fork is your only choice.  At the Linux system call
level, that's the only way to create a new process (well, that's true in the
general Unix books I've read - perhaps there's something new and fancy in Linux, I
haven't looked at the Linux system calls specifically).  You have to have a new
process, so you have to fork.  (There are some ways to hide the fact that you're
forking - running most programs from the shell does a fork, but you don't notice.)

You could perhaps use threads instead of processes.  I'd bet that perl supports
threads, does anyone know if Linux does?  Threads are less isolated from each
other than processes, so perhaps doing this with threads would hit per process
limits sooner than processes would hit the per user limits.  Your program doesn't
need threads (no need for communication between them), but I don't know the
tradeoffs between threads and processes to tell you which is better.

Dave

grant wrote:

> Actually infinite recursion is what I want, along with a nasty cascading
> effect.  Here I attached the little script.  It may make more sense this
> way.




More information about the clue-tech mailing list