Subject: Re: cygrunsrv fails to start
From: Fred Yankowski <[email-masked]>
To: Karl M <[email-masked]>
Cc: [email-masked]
Date: Thu, 31 May 2001 10:40:53 -0500

On Thu, May 31, 2001 at 07:59:16AM -0700, Karl M wrote:
> 1) How do I build cygrunsrv? (configure and make instructions...and I saw a 
> fill in the blank in the make file)

Just get the source and do 'make'.  No configure is necessary as this
is a Cygwin-only application.

> 2) When the SCM autostarts a service, does it also use start_service? Or is 
> there other code involved when the system starts the service at boot-up?

Whenever the NT SCM starts the service, either automatically during
system start or in response to a manual 'net start', it enters the
main() function of cygrunsrv with no optional arguments.  This causes
cygrunsrv to call StartServiceControlDispatcherA() to start up the
service threads.  That will indirectly call service_main() in another
thread.

> 5) I was thinking about getting the checkpoint value into the system log so 
> I can see how far it got?

That's the approach I would take:  start putting some printf() (to a
file) or syslog() calls in the code to see how far cygrunsrv gets.

Corinna:  I'm thinking about adding a 'debug' option to cygrunsrv so
that it generates such progress messages.  Would you accept a patch to
that effect?

> Timeout (30000 milliseconds) waiting for the OpenSSH service to connect.

> The OpenSSH service failed to start due to the following error: The service 
> did not respond to the start or control request in a timely fashion.

I think those are generated by the SCM itself, or by the NT
service-control APIs called within cygrunsrv.

> 7) Is there any problem with adding some syslog_starterr calls to mark 
> success also to see how far it gets at startup? (ie will this cause any 
> undesired interactions with being a service?)

I don't know about possible side-effects, but why not use syslog()
rather than syslog_starterr(), as the latter reports failure to start
the service each time it is called.

-- 
Fred Yankowski           [email-masked]      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple