<URL: https://rt.cpan.org/Ticket/Display.html?id=50020 >
The better place for this discussion is the libwin32 mailing list. Jan, as it seems you now have reviewed this patch, could you commit it to the libwin32 repository? Le Jeu 04 Mar 2010 19:01:46, j...@activestate.com a écrit : > On Thu, 04 Mar 2010, Gonéri LE BOUDER via RT wrote: > > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=50020 > > > > > This change in Olivier patch is enough to create an endless look with my > > Strawberry Perl: > > -bootstrap $Package; > > +bootstrap(__PACKAGE__); > > > > AFAIR I understand, instead of reading the "Win32::Daemon" string, > > bootstrap() try to access Win32::Daemon namespace and so, call Daemon.pm > > and call again bootstrap(). > > That change should not make any difference; __PACKAGE__ should just be > expanded to "Win32::Daemon" at compile time. > > > Regarding this change: > > - Win32::Daemon::StopService();^M > > + # Stop the service only if we are in the main thread (not in a > > forked process)^M > > + Win32::Daemon::StopService() if $$ > 0;^M > > > > perlvar says: > > $$ The process number of the Perl running this script. You > > should consider this variable read-only, although it will be altered > > across fork() calls. (Mnemonic: same as shells.) > > > > I don't understand why $$ should be 0 in the sub-process. > > $$ will be less than 0 in the child-process (which is just a pseudo-process > simulated by a thread on Windows). This is only true for Perl on Windows, > but Win32::Daemon only works on Windows anyways, so that is not an issue. > > Cheers, > -Jan > -- Olivier Mengué - http://o.mengue.free.fr/