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

x
?
Solved

Using fork to execute parallel child processes

Posted on 2004-11-28
2
Medium Priority
?
322 Views
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.

Joel
0
Comment
Question by:joeltillman
  • 2
2 Comments
 
LVL 18

Expert Comment

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

Accepted Solution

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

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