[Win32utils-devel] win32/service... still with problems.

Berger, Daniel Daniel.Berger at qwest.com
Mon May 22 16:04:46 EDT 2006


> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> Luis Lavena
> Sent: Monday, May 22, 2006 12:38 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] win32/service... still with problems.
> 
> 
> On 5/22/06, Berger, Daniel <Daniel.Berger at qwest.com> wrote:
> > I didn't see it because your 'log' method was defined 
> outside of your 
> > daemon class.  In fact, your script works just fine once you move 
> > those methods within the Daemon class itself.  Attached is 
> the script 
> > I'm using.  Here was the output:
> >
> > 2006-05-22 11:58:09 - ** Dead Simple Service starting...
> >
> > 2006-05-22 11:58:11 - ** Done initialization.
> >
> > 2006-05-22 11:58:11 - Entering Service Main
> > do nothing!
> >
> > 2006-05-22 11:58:49 - Leaving Service Main
> >
> > (I added some spaces there since Outlook is joining them 
> into a single 
> > string for some reason).
> >
> > Hope that helps.
> >
> > Dan
> 
> Daniel, you tried more than 1 start/stop cycles?

Yes.  I ran a series of start/stops as fast as my little fingers would
let me.  No problem.
 
> In the first run, everything worked ok, but several tries 
> after it, showed that it works "sometimes" and other don't. 
> (no matter if you left the service running for 1 second or 10 minutes)

When you say it didn't work, do you mean that the the service_main or
service_stop hooks weren't called?  Or some other error?

<snip>

> If you see the attached version, service_stop will try to 
> raise the Interrupt exception so the runner thread gets terminated.

Ok, I see the same behavior you mention - the service_stop handler
doesn't get executed for some reason.  I think we're back to the thread
issues that Heesob mentioned in a previous post about this.

Heesob, care to weigh in?

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.



More information about the win32utils-devel mailing list