| [reply] |
There seem to be several failure modes. Based on print statements, one situation occurs after the child script has completed. Somehow the child process is hanging on exit.
There's no explicit piping going on, although stdout and stderr are being inherited from the calling script.
| [reply] |
Screamer has a couple of good points on permissions of services. I've run into several instances where I did not have permission to read/write to a folder. I was not catching/logging the exception correctly. If you use a tool like PerlApp/PerlSvc, they will do some logging to the Windows Event Log for you. If you are rolling your own logging, might I suggest the CPAN (Win32::EventLog).
Even though your 3rd-party-service-program-runner-thingy works for other executables, you may be running into trouble running a script through Perl. You might try moving your parent script to be a service itself and starting/stopping it through the services API, which is quite dandy. If you go this route, there are two modules that make the job quite easy, Win32::Daemon and Win32::Process. I've had a lot of success using these two modules together -- in conjunction with the afore mentioned logging module.
If you would like more specific help rather than random, "hey try this" advice, post some code so we can dig through it!
Good Luck!
Casey
| [reply] |
These are some good thoughts. I think I need to provide some more details though.
The perl script doesn't always hang. It often does, but not always. Also, there are several different scripts that all hang from time to time. Usually the first few times after a reboot work; eventually I get the hang.
Making the Perl its own service is not an option because I need other features of the service. An easy way to think of this (and I've demonstrated the hang this way) is RSHing the script on a host.
| [reply] |