Hello tbsky,
Can you give example code for a service you run, together with the command sequence you issue to control service installation, etc.? So far, I’ve not been able to get your code to work — but that’s likely because I don’t know enough about the Win32::Daemon module. :-(
In the meantime, perhaps you could try a module such as Test::LeakTrace. Here’s how I would proceed:
use Test::LeakTrace; { my $result; leaktrace { $result = main(); }; exit $result; }
BTW, the following isn’t very informative:
print "Failed to install service: $!\n";
From the documentation, the correct way to report failure is like this:
print 'Failed to install service: ', Win32::FormatMessage(Win32::Daemon::GetLastError()), "\n";
Also, you have use Fcntl;, but I don’t think it’s actually used anywhere, is it?
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Win32::Daemon memory leak
by Athanasius
in thread win32::daemon memory leak
by tbsky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |