in reply to Can Win32::Daemon access remote shares?
As buk said, the problem is most likely in the premissions. If your service runs under the LocalSystem account it doesn't have acccess the WINDOWS networking. You have to run the service under some different account.
On "the re-execing": Win32::Daemon::Simple tries its best to prevent the service from crashing. It will write the error into the log file and try to continue. If you want to make more noise at this time you can either
If you think it would be helpfull I can update Win32::Daemon::Simple to send a network message ("net send ...") to somewhere if your callback dies and optionaly to even stop the service. I'd say ... if the Params=> option of use Win32::Daemon::Simple contains MessageOnError=> it would send the network alert to the specified username/computer. And then another option StopOnError would control whether to "re-exec" or stop. Something like this:
use Win32::Daemon::Simple Service => 'SERVICENAME', Name => 'SERVICE NAME', Version => 'x.x', StopOnError => 1, Info => { ... }, Params => { MsgOnError => Win32::NodeName(), # send to local console Tick => 0, Talkative => 0, ... };
Does that look OK? If anyone has some other suggestions, send them to me. I might even implement them ;-)
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Can Win32::Daemon access remote shares?
by rah (Monk) on Apr 13, 2003 at 18:58 UTC | |
by Jenda (Abbot) on Apr 13, 2003 at 19:16 UTC | |
by rah (Monk) on Apr 13, 2003 at 19:25 UTC | |
by Jenda (Abbot) on Apr 13, 2003 at 19:41 UTC | |
by rah (Monk) on Apr 13, 2003 at 22:43 UTC | |
|