Fellow monks,
I'm painfully confused by an apparent broken interaction between IO::Pipe and Net::Server(::Fork).
I have a program which started life as a standalone command-line tool. At its heart, it created a new IO::Pipe and used it as
$pipe->reader('command', 'arg');
I needed to change the standalone tool to be a socketed server and picked Net::Server::Fork since that seemed like a good fit. Now, a server child process collects all sorts of stuff from the connected client and then proceeds to run a wrapped version of what started in the stadalone tool.
However, in the standalone version, I could do:
$pipe->reader('command', 'arg');
my $line = scalar(<$pipe>);
and I'd get data. In the Net::Server/wrapped version, I don't get anything from the
scalar(<$pipe>); call and, instead, the output of 'command' is dumped on the server's STDERR.
Has anyone seen this behavior or have an idea of what could be broken?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.