Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Using fork to execute parallel child processes

Posted on 2004-11-28
Medium Priority
Last Modified: 2006-11-17
Hello all

I am new to Perl and am trying to experiment with its management of UNIX processes.  What I am trying to do is, as a parent, execute 2 child processes that communicate with each other via a pipe (I am executing these processes using fork).  the child processes are simply going to be small bourne shell scripts.  the standard input of the first process needs to be the standard input of the Parent, the standard output needs to be the pipe to the second process.  the standard input of the second process needs to be the pipe of the first process and the standard output needs to be the standard output defined in the Parent  Any assistance offered will be greatly appreciated.

Question by:joeltillman
  • 2
LVL 18

Expert Comment

ID: 12691181
Have a look at IPC. Specifically the Open2 function is what you're looking for.
LVL 18

Accepted Solution

kandura earned 675 total points
ID: 12692186
another helpful module is IO::Pipe.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question