Greetings All!

I think I have the forking business down, along with the flocking (thanks to Abigail). My new question is this: so, in the invocation of the tool mentioned here, the user usually calls many different files, in the order that they are supposed to run in. So, waiting might be in order, but the question is how? I propose this:

1)Start a child for every server that the file has to go to
2)In the initial fork, keep track of the pid's of the children (put them in an array?)
3)Have the parent do a waitpid on each of the children pid's
4)Once all the children have returned, continue on with the next file (repeat the process)

It is the waitpid that I'm a bit shaky on. The camel wasn't much help. Any light you could shine on this problem would be appreciated.

Thanks,
thor

In reply to Fork novice requests help...Part Deux by thor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.