in reply to Re^6: Behavior of threads on XP-- system() works, backtic & popen don't...
in thread Behavior of threads on XP-- system() works, backtic & popen don't...

Perhaps if you posted the exact code that you are testing with, rather than a vague description of a vague starting point, then I might see why my attempts to reproduce your code from your descriptions doesn't hang and yours does.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^7: Behavior of threads on XP-- system() works, backtic & popen don't...

Replies are listed 'Best First'.
Re^8: Behavior of threads on XP-- system() works, backtic & popen don't...
by Sync (Initiate) on Jun 16, 2006 at 21:54 UTC

    The exact code is in Re:^2.

    But to be even more exact, the data I put in the test dat files is exactly two lines:

    world
    hello

    Though I tried a 1-9 approach as you did in Re:^3 and it didn't change the result. And the exact .bat script for looping the test until it hangs is also in Re:^2:

    LOOP: perl thread2.pl goto LOOP

    On 3 out of 5 machines I tried it hangs immediately just after the first output of the system() results of the threads, on the other two machines it loops a few times then hangs at various points. On those machines it takes less than 60 seconds to produce a hang. -- Sync

      And the exact .bat script for looping the test ...

      Um. Not quite.

      c:\test>555304 c:\test>LOOP: 'LOOP:' is not recognized as an internal or external comm operable program or batch file. c:\test>perl 555304.pl Thread 1 Thread 2 Thread 3 Thread 4 Via system: hello world Via system: hello world Via system: hello world Via system: hello world Via backticks hello world Via backticks hello world Via backticks hello world Via backticks hello world Via pipe hello world Via pipe hello world Via pipe hello world Via pipe hello world c:\test>goto LOOP The system cannot find the batch label specified - LOOP

      The syntax should be (note the placement of the colon ':' in the first line):

      :LOOP perl 555304.pl goto LOOP

      However, having corrected that, I did manage to reproduce the hang. I don't know the cause, but at least I have something to work with. You should probably raise a perlbug so that the p5p guys can see what they can see.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        And the exact .bat script for looping the test ...

        Um. Not quite.

        c:\test>555304
        c:\test>LOOP:
        'LOOP:' is not recognized as an internal or external comm operable program or batch file.

        Oops-- my bad. I thought I could type that part in from memory as it was small... Guess not...

        Sent a perlbug, had also posted it to the ActiveState site, but not a peep. Bug instructions say to send to support@activestate.com as well as perl.org which I did.

        Glad to see I'm not going crazy-- yet...

        -- Sync