Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: IO::Pipe hangs

by Anonymous Monk
on Sep 20, 2012 at 19:28 UTC ( #994740=note: print w/ replies, xml ) Need Help??


in reply to Re: IO::Pipe hangs
in thread IO::Pipe hangs

On Solaris it works as well. Something wrong with Windows implementation?

C:\>perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x +64-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2011, Larry Wall Binary build 1402 [295342] provided by ActiveState http://www.ActiveSt +ate.com Built Oct 7 2011 15:19:36 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. C:\>


Comment on Re^2: IO::Pipe hangs
Download Code
Re^3: IO::Pipe hangs
by Anonymous Monk on Sep 20, 2012 at 19:47 UTC

    Something wrong with Windows implementation?

    It doesn't hang for me with sysinternals pslist, Devel::VersionDump

    Perl version: v5.14.1 on MSWin32 (C:\perl\5.14.1\bin\MSWin32-x86-multi +-thread\perl.exe) Carp - 1.26 Devel::VersionDump - 0.02 Exporter - 5.66 IO - 1.25_04 IO::Handle - 1.31 IO::Pipe - 1.14 SelectSaver - 1.02 Symbol - 1.07 XSLoader - 0.15 strict - 1.04 warnings - 1.12
Re^3: IO::Pipe hangs
by BrowserUk (Pope) on Sep 20, 2012 at 20:00 UTC
    Something wrong with Windows implementation?

    More of a platform difference -- a thread used instead of a fork.

    Use this instead:

    use strict; use warnings; my $cmd = "tasklist"; my $pid = open PIPE, "-|", $cmd or die $!; while (my $line = <PIPE> ) { print $line; last if $line =~ /^smss/; } close PIPE;

    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.

    RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994740]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-09-17 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (56 votes), past polls