I have a bit of a quandry.
I'm running a number of forked processes in a program.
The name and number of these processes varies from each running of this program, so they are called using an iterative loop.
I've managed to get the processes to run concurrently, using fork and pipe, but there isn't a mechansim to pass the output back to the parent program, which I need to do.
I know I have the option of creating a temp file, but that becomes a problem when multiple users are running this program (web based).
I was thinking of creating a filename based on rand(), but them someone suggested I look at IO::Select. Problem is, every example I see uses sockets, and that's not really necessary in this situation. The forked processes being run are from a group of custom 'handlers' I've written. All the scripts are in one location, so they will always run from that place. Can IO::Select be used here without creating sockets? If so, how can I use it to harvest the output of these processes?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.