in reply to Re^2: Running a perl script as a system command in another thread hangs while main thread reading from STDIN
in thread Running a perl script as a system command in another thread hangs while main thread reading from STDIN

Could you try adding the -l option to your perl one line and try it on the errant system(s).


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Running a perl script as a system command in another thread hangs while main thread reading from STDIN

Replies are listed 'Best First'.
Re^4: Running a perl script as a system command in another thread hangs while main thread reading from STDIN
by rmahin (Scribe) on Sep 30, 2014 at 01:16 UTC

    Tried as you suggested, and there was no change at all :/

    C:\>test.pl 1 ### Running a perl script ### 0s : Thread 0 - > Creating threads 0s : Thread 1 - Created 0s : Thread 2 - Created 0s : Thread 3 - Created 1s : Thread 0 - All Threads created 1s : Thread 0 - > Waiting for input now. All threads should finish now + without pressing enter 3s : Thread 1 - Starting 'perl -le "print \"hello world\""' 3s : Thread 2 - Starting 'perl -le "print \"hello world\""' 3s : Thread 3 - Starting 'perl -le "print \"hello world\""' 17s : Thread 0 - > Input received, all done 17s : Thread 2 - Finished the command: hello world 17s : Thread 3 - Finished the command: hello world 17s : Thread 1 - Finished the command: hello world 17s : Thread 0 - All Threads joined

      Could you post the output from perl -V on the affected system?


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        I included that in my first reply to you, but I will add it in to my original post for clarity. Both 2012 systems are using active state perl 5.18.2
        C:\>perl -v This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x +64-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2013, Larry Wall Binary build 1801 [297964] provided by ActiveState http://www.ActiveSt +ate.com Built Feb 24 2014 11:06:47 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.