This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygrunsrv fails to start


On Thu, May 31, 2001 at 10:34:17PM -0700, Karl M wrote:
> If I add syslog statements, when it works I see log entries for all of them. 
> When it doesn't work, I see none of the log entries that I added. The first 
> one was just after the openlog call in service_main (and just before the 
> RegisterServiceCtrlHandlerA call). Sometimes it works, sometimes it doesn't.

You've done a good job chasing down the problem so far, and I
sympathize with the hassle involved in tests that require restarting
NT over and over.

I would suggest adding some trace statements that write to a file
rather than depending on the syslog facility.  I would put one right
after the entry to main() to see if the process is even entered.  Be
sure to flush() the trace output after each message in case the
process aborts and loses buffered output.  I would put another trace
message at the point where StartServiceCtrlDispatcherA() fails in
main().  Then I'd put another right after the entry to service_main().

It looks like failure of StartServiceCtrlDispatcherA() would not be
reported currently, given that error() writes to stderr and that
stream is useless in this case.  However, it's hard to see how that
API could fail in some cases and not others.

Your questions about possible problems in loading the cygwin1.dll
occurred to me too, but I don't know anywhere near enough about Cygwin
to suggest how to explore that possibility.

-- 
Fred Yankowski           fred@OntoSys.com      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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]