On Sun, Jul 27, 2003 at 04:36:36PM +0200, Gooly wrote:
> Hi,
>
> trying to work with the a.m. Job-Server I found some bugs that I've replaced:
> (hope you don't mind)
>
> 1) the 1st Line I eliminated the '-':
> from #!/usr/bin/perl -
> to #!/usr/bin/perl
> because I never thought of that, it took my 1 hour to find out why nothing
> happens :-/
Ha! Thanks for fixing that. Someone else added it, and I thought "they
must know what they're doing" without testing it.
> 2) I replaced the apparently depricated Filter:
> Filter => POE::Filter::Line->new(),
> into:
> StdioFilter => POE::Filter::Line->new(),
> StderrFilter => POE::Filter::Line->new(),
> I think this is ok?
Thanks for fixing the sample program.
> But here may be that you better know what and where to change:
>
> 3) The program that was started by the Job_Server was NOT killed (when the
> Client disconnects). In my program I added:
> system('kill', $heap->{job}->PID)
> But I assume there are more elegant ways t do that, deep in the source.
This will do it:
$heap->{job}->kill("TERM");
Or at the very least use Perl's built-in kill() function:
kill(TERM => $heap->{job}->PID);
> 4) If the Client just disconnects the Server allways writes:
> Client session 3 got read error 0 (Normal disconnection)
> I think, if it is a 'Normal disconnection' it is not woth to mention.
A lot of people agree with you. I have committed a patch for this to
CVS, and it'll be in the next release.
--
Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/