I remember reading something in the SrvAny docs about your application needing to ignore some sort of signal if it wanted to survive a logon/logoff.

For WIN32 graphical applications: when the currently logged-in user is logging-off, all WIN32 top-level windows receive WM_QUERYENDSESSION and WM_ENDSESSION messages. Some WIN32 applications choose to terminate upon receipt of such messages. In order for your WIN32 application to survive logoff, it must not do that: instead, your windows procedure should call the default windows procedure on these messages.}

Does this even apply to POE?


At 10:36 AM 8/4/2003 -0700, you wrote:
A few questions:

1. Which NT flavor are you using?
2. Is the monitored directory local to the machine?
3. How are you reading the directory?
4. If the answer to #3 is readdir(), have you tried Win32::ChangeNotify or Win32::AdvNotify?


I use Win32::Daemon for Win32 services, so I don't have any PerlSvc advice per se. Your description of things working only while logged in reminds me of a DCOM identity issue. I'm not sure how/if that would apply in this case.


Peter Guzis Web Administrator, Sr. ENCAD, Inc. - A Kodak Company email: [EMAIL PROTECTED] www.encad.com

-----Original Message-----
From: PerlDiscuss - Perl Newsgroups and mailing lists
[mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2003 4:43 AM
To: [EMAIL PROTECTED]
Subject: NT Service POE problem


I have written a POE application and have been using the ActiveState PDK 5.1 to create an NT service that primarily polls a directory and does some other things but is similar to the DirWatch component.

The main function implements the polling using the kernel call:

$kernel->delay_set(checkdir => 10);

Everything works fine running as an NT service, until the user who started
the service logs out of the operating system session and the service
stops. It looks from the application log files that POE thinks that there
are no pending actions and terminates the POE->run; cycle. If I stay
logged into the application is has successfully run for weeks.

The NT service is set to login into the local system account and it does
not seem to matter if the interact with the desktop option is set or not.
I have also tried having the service log into other accounts but it does
not make any difference.

Does anyone have any clues as to why the POE session would terminate or
any pointers as to what is happening?

Regards,

Dr. Harley Mackenzie
HARD software



Reply via email to