Re: POE and perl fork interaction
Robert Landrum <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
It's not clear what you're trying to do, but I suspect that you're doing it wrong. :( Is there a reason why you don't use POE::Wheel::Run to tail the files? There's also: http://search.cpan.org/~rcaputo/POE-1.003/lib/POE/Wheel/FollowTail.pm I suspect that your forked tail process may have events queued from the parent, as outlined in POE::Wheel::Run section on Nested POE Kernels. Good luck. Rob Deven Parekh wrote: > Hello, > > Is it possible to use POE and the fork function in the same script. > I am running into an interaction problem where the POE::Kernel does not > return if i have forked off other process outside of the POE. Any input on > what I may be doing wrong > > Here is the psuedo code logic of my script > > #--- Call a function to fork off a process to start tailing some files > #--- store its the above pids so we can terminate later > > #--- Call POE::Wheel::Run to do some task > > #--- After the above POE task returns kill the tailing process > > > If i do not do the forking for tailing files, the POE::Kernel returns after > the > task is completed, but if I fork of the tailing process as above, > the POE::Kernel never returns. > > Any input will be appreciated. > > Thanks in advance. > > BR > DP > p.s: I thought i had read about this interaction somewhere in documentation > but am not > able toget to it to follow discussion around it, if any. > >