I'd most likely agree with you, but to be honest I don't know to much about fork and how it's supposed to work. I am still in the process of studying the appropriate chapter in the Camel. But I do recall it mentioning that forks in perl were implemented with threads of some sort ( ithreads I think ) but was bent to more resemble a Unix Fork.

I do hope I made it clear in my first post that I didn't really know what was going on. I am however, curious why my first example seems to run as expected, or is this also a situation of the open happening after the other process has already printed it's message.

I'm also not entirely clear as to what select is doing. I can't seem to find any mention of that particular form in perlfunc. And neither of the two mentions in perlipc seem to say what they're doing.

Update: Ack, Just realized I should probably look in the camel, and managed to dig up what select is doing, apparently it's just putting a minor delay in one of the processes, I assume the purpose in the initial verion was to make certain that one process' print happened after the other's open, so it would seem that both my examples seemed to have the desired effect only due to (in one case) the random chance of one of the print's happening before the open. And in the other case because the open itself was delayed, making certain that the other process got it's print out beforehand. bleh...

Just Another Perl Alchemist

In reply to Re: Re: Re: Windows filehandles and fork by Koosemose
in thread Windows filehandles and fork by egarland

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.