Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Search for module helping to spawn a filter like child process

by McA (Priest)
on Mar 05, 2013 at 09:23 UTC ( #1021779=perlquestion: print w/replies, xml ) Need Help??
McA has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I want to spawn 1..n child processes in a way that the STDIN of the child is connected to one pipe file handle of the parent (writing to the child) and the STDOUT of the child is connected to a file handle of the parent talking results to the parent.

Is there a package out there supporting this kind of spawning and communicating. I know that you have to be careful not to get a deadlock with this kind of communication.

Backround for other solutions: I want to implement a process which grabs job tickets from database and dispatches them to 1..n worker scripts and then collecting the results. Probably there is also a ready to use solution out there.

Best regards
McA

  • Comment on Search for module helping to spawn a filter like child process

Replies are listed 'Best First'.
Re: Search for module helping to spawn a filter like child process
by kielstirling (Scribe) on Mar 05, 2013 at 09:32 UTC
    Look at IO::Pipe.
Re: Search for module helping to spawn a filter like child process
by McA (Priest) on Mar 06, 2013 at 07:32 UTC

    Good morning,

    really no other advices, hints how to solve such a batch job queue with several workers?.

    Nice day
    McA

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1021779]
Front-paged by Arunbear
help
Chatterbox?
[Corion]: ambrus: Hurr - yes, that might happen, as Prima will queue lots of stuff (Well, Windows will)
[Corion]: But I'm really amazed that it just took this little code (plus the idle handler I have in mind and something else dk suggested)
[Corion]: ambrus: I wrote the handler so that it stops the timer if it's supposed to be a one-shot
[Discipulus]: are you using Prima Corion? good morning Corion and ambrus, btw

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2016-12-09 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.