RE: unfortunate behavior after upgrading POE

"Ellery, Michael" <[email protected]> Fri, 3 Sep 2010 11:31:10 -0700
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
Aha! - no I had not tried that. But I just tested it quickly on my sample at it seems to resolve the issue. I'll do some more testing, but it looks promising. Thanks.

-Mike

-----Original Message-----
From: Jean Stebens [mailto:[email protected]] 
Sent: Friday, September 03, 2010 11:26 AM
To: Ellery, Michael; [email protected]
Subject: Re: unfortunate behavior after upgrading POE

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/03/2010 12:43 AM, Ellery, Michael wrote:
> Sorry - sending this again without attachments....
> 
> Yes - I have verified that we have the same problem with the latest version of POE.
> 
> Upon distilling the problem down, I've discovered that it's actually some sort of interaction with Proc::Daemon (which we use to daemonize the parent process...) and POE. We've been using this module for daemonization for as long we we've been using POE and it didn't exhibit problems with earlier versions of POE.
> 
> I've created a snippet here: http://snipt.org/kgoZ that reproduces the problem. If you comment out the Proc::Daemon::Init call at the beginning and let it run in the foreground, the problem does not occur. If you uncomment it, then you should see that the master process spikes on the CPU.  I'm guessing the fact the Daemon::Init closes some filehandles confuses POE.
> 
> Please let me know if you have any advice about how to make these modules play better together.
> 
> Thanks,
> Mike Ellery

hey there,

is is a Snippet which I'm using for poe and proc daemon:

<schnip>
use Proc::Daemon;
Proc::Daemon::Init;

# Tell the kernel to reopen all closed pipes by Proc::Daemon
POE::Kernel->has_forked() if POE::Kernel->can('has_forked');
</schnip>

Tried this aswell?

cheers,
jean
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAkyBPcYACgkQXY+L530SV9HDfwQAhhQV+YBX4RsFOL/RguMfE8Kx
ruwMXz16ROpWCMJ7imsMLxvf3yHJwkzteUtONvJbSi5sjZB0/DJLszlU8oUXiIAt
UbVoVhNobsKrEX20f5+ov0F93F8YkIuvYfb/ssvUyjOf8UqbmDE6hVPdrjcaudDx
nRBhcSBU8J8HxziH2U8=
=zhpn
-----END PGP SIGNATURE-----


 To report this as spam, please forward to [email protected].  Thank you.


 Protected by Websense Hosted Email Security -- www.websense.com