This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart


Please, https://cygwin.com/acronyms/#TOFU
Thank you.

On Jan 28 17:38, Cary Lewis wrote:
> On Wed, Jan 28, 2015 at 5:18 AM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Jan 27 15:02, Cary Lewis wrote:
> >> On Tue, Jan 27, 2015 at 4:09 AM, Corinna Vinschen
> >> <corinna-cygwin@cygwin.com> wrote:
> >> --neverexits works, but not if the program that cygrunsrv starts is
> >> stopped with a kill -9 signal. Perhaps the -9 signal propagates to
> >> the cygrunsrv.exe program?
> >
> > Hmm, yes.  Cygrunsrv evaluates how the service process ended, and
> > only if it exited the neverexits logic comes into play.  If it ended
> > due to a signal, it does nothing.
> >
> > This is unfortunate because it diminishes the usefulness of
> > --neverexits.  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?
> >
> > The patch is simple and I could upload a new cygrunsrv today or
> > tomorrow.
> 
> That sounds like a plan, thanks Corinna.
> 
> Do we need test how the service (program that cygrunsrv is running)
> exited? If --neverexits is present, it shouldn't care how it exited,
> it should just pass the fact that it exited unplanned to the SCM so
> that the recovery actions take place.

This is what happens now in 1.62-1 when it exited due to an unplanned
signal.

> It's only if cygrunsrv is the one that causes the 'service' to exit
> that the --neverexists shouldn't be considered.

That's when the termination or shutdown signal arrives.  Please give
cygrunsrv-1.62-1 a try.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpUgMfU1Ng8B.pgp
Description: PGP signature


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