Re: POE::Wheel::Run::Win32 and Win32::Daemon

Andreas Altergott <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Organization MIRA Consulting GmbH
Message-ID <[email protected]>
Hi,

Andrew Feren wrote:
> I removed the calls to exit() and the service started working as
> expected.  Calling exit() from the child resulting from perl's pseudo
> fork is supposed to work (and often does).  Unfortunately it has been my
> experience that sometimes the results are a catastrophic  failure.

That's a surprise.  So the exit subroutine must call something
different, than simply letting the program run out.  That would be a
nice question to the ActiveState developers.

There is the possibility to use fork() as long as you do not use exit()
then.  Probably that's why threads have been working.  I did not use
exit() there.

I'm just curious.  Is there another way to stop a POE application
immediately?

There's the possibility of using stop().  If I run this inside the
forked child, this should not affect the parent.  But still some code in
the _stop state will get executed.

> How did you use exec()?  calling exec() after the fork() failed for me
> in the same way as calling exit.

I did not try to run exec() from a fork.  That's sad to hear, else one
could use Wheel::Run by setting the program to an array.  This would run
exec() on line 443, instead of the final exit() on line 440 in Wheel::Run.


Regards,
Andreas
signature.asc (application/pgp-signature, 260 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrcs28ACgkQImDrLy4cAN+YCgCgzXnCuNzN97x9fV/8UXzwlA5e
6poAn0Icw5DkQkEqVzlubd75alZEmTm4
=LtTq
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.