[Chicago-talk] Do I need a fork for this?

Dan Rench drench+chipm at gmail.com
Fri Jan 9 12:27:43 PST 2009


On Fri, Jan 9, 2009 at 12:37 PM, Richard Reina
<richard at rushlogistics.com> wrote:
> I'm pretty sure I can't as this code is going to have to run on some older machine in the office that run older versions of perl and cannot be updated. Is there an easy way to do it with fork?

If you can't update Perl but can install CPAN modules,
http://search.cpan.org/dist/forks/ is pretty neat. It emulates threads
with fork and ipc tricks.

If that's not an option either, then fork() (or more likely something
like open(FH, '-|') ) should do what you want, but the fun part is
sending the results back to the parent process. What kind of return
values do you expect from list_compiler()?


More information about the Chicago-talk mailing list