cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart
Thu Jan 29 09:34:00 GMT 2015
On Jan 28 16:58, BGINFO4X wrote:
> 2015-01-28 16:37 GMT+01:00 Corinna Vinschen <firstname.lastname@example.org>:
> > On Jan 28 15:42, Kizito Porta Balanyà wrote:
> >> 2015-01-28 12:55 GMT+01:00 Corinna Vinschen <email@example.com>:
> >> >> I could patch cygrunsrv to do this:
> >> >>
> >> >> If the service exited due to a signal, and if that signal is not the
> >> >> defined termination or shutdown signal (default SIGTERM for both),
> >> >> and if --neverexits has been defined, then performas the neverexits
> >> >> action.
> >> >>
> >> >> Does that sound ok?
> >> I would say that this should be the default behavior:
> >> If the signal is SIGTERM and the service is configured to restart the
> >> program, then restart the program.
> > No. SIGTERM (rather: the defined termination signal) is send
> > explicitely from cygrunsrv to the service process to stop the service.
> > If this is handled like --neverexits, it would be impossible to stop a
> > service manually. The neverexits case should only cover the cases of
> > exiting as a result of an unexpected signal (SIGSEGV, etc).
> I explained it bad. English is not my "default" language. :)
> What I mean is:
> - If the automatic restart of the service is defined by the
> administrator, the service should restart by default.
> - So, It shouldn't be necessary to register the service with --neverexits.
Ok, I get your drift. You're right, but this is a bit more complicated
than the simple tweak I applied to cygrunsrv today.
There's certainly room for improvement in cygrunsrv. It's showing its
age, most of the code is unchanged since Cygwin still supported NT4.
It's not using the QueryServiceConfig2/ChangeServiceConfig2 functions at
I wouldn't be too unhappy about a developer having fun to improve
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin