RE: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> No, 30 seconds is a hard system timeout in which a service must reply with
> an appropriate control message to let services.exe know it is ready to
> continue startup sequence.

I don't think there is a hard-coded system timeout, as long as the starting 
service keeps
posting its START_PENDING status, the service controller will wait.
And cygrunsrv seems to be doing that already.

MSDN doc says exactly that.  And I've also seen some articles that tell the 
same.

https://docs.microsoft.com/en-us/windows/desktop/api/winsvc/nf-winsvc-setservicestatus

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Andrey Repin
Greetings, Corinna Vinschen!

> On Feb 15 14:44, Andrey Repin wrote:
>> Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]!
>> 
>> > It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time
>> > for a service to start, then bails out with a failure.
>> 
>> No, 30 seconds is a hard system timeout in which a service must reply with an
>> appropriate control message to let services.exe know it is ready to continue
>> startup sequence.

> Oh, really?  If so, I completely forgot about that...

This is the best I could dig right now at the subject.
https://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus
And MSDN article 
https://docs.microsoft.com/en-us/windows/desktop/services/the-complete-service-sample
Looks much the same.

All the internet flooded with useless "pick 'service application' template in
Visual Studio" crap, hiding the actually useful information.
May be some more time spent in Google with control signal names reveal even
older (== more useful) articles.
Don't have that time right now, sorry. :(


-- 
With best regards,
Andrey Repin
Friday, February 15, 2019 16:59:39

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Corinna Vinschen
On Feb 15 14:44, Andrey Repin wrote:
> Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]!
> 
> > It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time
> > for a service to start, then bails out with a failure.
> 
> No, 30 seconds is a hard system timeout in which a service must reply with an
> appropriate control message to let services.exe know it is ready to continue
> startup sequence.

Oh, really?  If so, I completely forgot about that...


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer


signature.asc
Description: PGP signature


Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Andrey Repin
Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]!

> It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time
> for a service to start, then bails out with a failure.

No, 30 seconds is a hard system timeout in which a service must reply with an
appropriate control message to let services.exe know it is ready to continue
startup sequence.

> It would be quite useful (in certain situations) to have a command-line
> parameter (for the -I option) that can specify a service startup timeout,
> longer or shorter than the preset default.

Is there such a feature at all to begin with?
A link to MSDN would suffice.


-- 
With best regards,
Andrey Repin
Friday, February 15, 2019 14:42:40

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Corinna Vinschen
On Feb 14 20:47, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
> Hi all,
> 
> It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time 
> for a service to start, then bails
> out with a failure.
> 
> It would be quite useful (in certain situations) to have a command-line 
> parameter (for the -I option)
> that can specify a service startup timeout, longer or shorter than the preset 
> default.

Patches welcome!  The source is at

https://cygwin.com/git/?p=cygwin-apps/cygrunsrv.git


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer


signature.asc
Description: PGP signature


cygrunsrv to have a timeout parameter for service startup

2019-02-14 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi all,

It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time for 
a service to start, then bails
out with a failure.

It would be quite useful (in certain situations) to have a command-line 
parameter (for the -I option)
that can specify a service startup timeout, longer or shorter than the preset 
default.

Thanks for considering this,
Anton Lavrentiev

P.S. Maybe for the service shutdown as well, separate or the same parameter 
used.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple