Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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 00:14 UTC ( [id://1102396]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl
    use strict;
    ...
        chomp $output;
        tprint("Finished the command: $output");
    }
    
  2. or download this
    C:\>test.pl
    ### Running a regular command ###
    ...
    8s : Thread 3 - Finished the command: hello world
    8s : Thread 2 - Finished the command: hello world
    8s : Thread 0 - All Threads joined
    
  3. or download this
    C:\>perl -v
    
    ...
    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.
    
  4. or download this
    C:\>test.pl 1
    ### Running a perl script ###
    ...
    
    7s : Thread 0 - > Input received, all done
    7s : Thread 0 - All Threads joined
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1102396]
Approved by biohisham
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-23 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found