Hi again,
I have a problem which I don't understand with that Job_Server:
http://poe.perl.org/?POE_Cookbook/Job_Server
using
use POE qw(Component::Server::TCP Wheel::Run);
The Job_server seems not to get the STDOUT of the job?
So - in short - in the job:
print $incommingLines,"\r\n"; # is silent
Even the console (where the Job_Server is running) doesn't print anything.
(even this does not work
print STDOUT $incommingLines,"\r\n"; # is silent
)
but this works:
print STDERR $incommingLines,"\r\n"; # rceives the Client
This is the standard code:
..
InlineStates =>
{ got_job_stdout => sub {
print "job->Cl: $_[ARG0]\n"; # <= my addendum
$_[HEAP]->{client}->put("out: $_[ARG0]")
},
got_job_stderr => sub {
$_[HEAP]->{client}->put("ERR: $_[ARG0]")
},
...
In the 'wheel' was started:
heap->{job} = POE::Wheel::Run->new
( Program => $program,
StdioFilter => POE::Filter::Line->new(),
StderrFilter => POE::Filter::Line->new(),
StdoutEvent => "got_job_stdout",
StderrEvent => "got_job_stderr",
CloseEvent => "got_job_close",
);
the $program started correctly, I even can send lines to the job, but I get
those lines back only via STDERR.
Any hint || help appreciated,
Carl