in reply to win32::daemon memory leak
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, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::Daemon memory leak
by tbsky (Novice) on Dec 23, 2015 at 08:13 UTC | |
by Discipulus (Canon) on Dec 23, 2015 at 08:53 UTC | |
by tbsky (Novice) on Dec 23, 2015 at 09:48 UTC |