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:
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?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.