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

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

Andrew Feren wrote:
> Something like the following will give you better results.
> 
>        my $pid;
>        if($pid = fork()) {
>          print(FOUT "running ($pid)\n");
>          wait();
>        } else {
>          open(FOR, '>>', 'C:\delme-kid.txt');
>          thread();
>          close(FOR);
>          sleep(10);
>          exit(0);
>        }

Thanks for the suggestion, but I do not see why this should give better
results in combination with Win32::Daemon.  As already described the
service will get a termination request as soon as the child terminates,
if you do use fork.  Nevertheless I tested this and it did terminate the
service after one loop.

The termination request comes from the service control manager.
Probably it thinks the service terminated.  This doesn't make sense.
Especially because it tries to tell a service to stop, which in its
opinion did already stop.  Nevertheless it does so.

This behaviour happens only with fork AFAIK.


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/

iEYEARECAAYFAkrTQzwACgkQImDrLy4cAN+RIwCfRHgKmsKVCmDr2rEX3QF51FKT
+aAAoKbnQhwcC6tLRa8X+61zqr7LNB0/
=S8QP
-----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.