Some notes before I get started:
-
Could you remove your <pre>..</pre> tags please? Use <p> at the start of paragraphs. Use <c>..</c> or <code>..</code> around computer text, code and data..
-
You seem to be reinventing parts of IPC::Run. Is there really a need for this module?
I have couple of problems in dealing with Filehandlers
They are called "file handles". Note the space and the lack of "r".
Want to check whether input filehandler is ready to receive input
can_write and select in IO::Select will tell you that on non-Windows systems. I don't think it's possible in Windows. (Alternate paradigms are used.)
Issues with output and error filehandlers in returning buffer text
Sorry, but you can't control whether another process buffers its output or not unless the specific program provides you a specific means (e.g. a command line option) of doing so.
However, you can fool most by creating a pseudo-tty. See IPC::Run and IO::Pty.
Filehandle GEN0 opened only for output at Task.pm line 89.
You should have two selectors. One for inputs and one for outputs.
sub DESTROY {
my $self = shift;
&stop;
}
That should be
sub DESTROY {
my $self = shift;
$self->stop();
}
stop expects to be called as a method.
local $SIG{INT} = 'IGNORE';
kill INT => -$$;
That should be
kill INT => $self->{pid};
There's no reason to kill every child.
-
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>
<u> <ul>
-
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
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.