The PoCo::Child examples all use "ls" as the child program. This is
fine for showing how to work with a child that wants some command line
arguments to generate STDOUT, but I need a solution that lets me write
to STDIN and respond to STDOUT. So I reworked the example to use "nl"
to accept some $c->write() commands and add a line number -- with a
little tweaking (had to use conduit => 'pty' instead of pipe), this
works quite well.
However, I'm not sure how to get rid of the thing! When I am done
sending info to the STDIN, I send a $c->quit(), (and checking the
process list the process is indeed gone), but something seems to be
hanging on -- POE won't wrap up and clean up after itself -- it just
hangs. I tried using PoCo::DebugShell, but PoCo::DebugShell and
PoCo::Child seem to fight over STDOUT:
Can't locate object method "OPEN" via package
"POE::Component::DebugShell::Output" (perhaps you forgot to load
"POE::Component::DebugShell::Output"?) at
/usr/lib/perl5/site_perl/5.6.1/POE/Wheel/Run.pm line 379.
Any suggestions on where to go next?
- PoCo::Child Mike Schroeder
- Re: PoCo::Child Erick Calder
- Re: PoCo::Child Mike Schroeder
- PoCo::Child Erick Calder