delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to:content-type; q=dns; s=default; b=MM | |
EQpA1zJOal9ybXDyah7C1YWCja7a2clE2siEutoSJaJqfhoKerQLUKRKdYCM4W/o | |
p0YdTY/GBPZn6GAwMHyO7wtZE1IECBzbz4j3S3juNPyImEXJu5smbiEP1ubsrstU | |
aT2+KbxxDSxoHebY6MmVWm/fO94ev1cdYyhW765CU= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to:content-type; s=default; bh=kXifv3cy | |
og2B2z1JV3yITuxOgiI=; b=xUAGTZkSaVIFeBQohqHB5QJchdJrKDPkQGfyJlOJ | |
i5JloSb54WOuNtY7XwnHM5Uqy3xPBWUpxGvsTwmvalLk20dp7h10I9jL2idjoHzu | |
2dRbOEBFHp8qjSej3Fo1EnNPQIXeLrdHh1c3C7oNdXQQzM412UBT0zieDNMrPiuD | |
dEU= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=0.3 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 |
X-Spam-User: | qpsmtpd, 2 recipients |
X-HELO: | mail-qg0-f52.google.com |
MIME-Version: | 1.0 |
X-Received: | by 10.229.125.133 with SMTP id y5mr1601258qcr.17.1422484692195; Wed, 28 Jan 2015 14:38:12 -0800 (PST) |
In-Reply-To: | <20150128101833.GX14265@calimero.vinschen.de> |
References: | <CAEF1h+Wghm86TybnaLMz9TdX5NUV15aNBAC1KZ1dKhUOVZ-_Qg AT mail DOT gmail DOT com> <20150127090910 DOT GF14265 AT calimero DOT vinschen DOT de> <CAEF1h+XeFp_OCDNo-ok_EW=-1h94=mQRRz_ucZsix4wmow+WvQ AT mail DOT gmail DOT com> <20150128101833 DOT GX14265 AT calimero DOT vinschen DOT de> |
Date: | Wed, 28 Jan 2015 17:38:12 -0500 |
Message-ID: | <CAEF1h+V75nQ3mo-ju+0VfhZu8=Wdp=+UwgpxxtGuvpuBTHt19g@mail.gmail.com> |
Subject: | Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart |
From: | Cary Lewis <cary DOT lewis AT gmail DOT com> |
To: | cygwin AT cygwin DOT com, corinna-cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
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. It's only if cygrunsrv is the one that causes the 'service' to exit that the --neverexists shouldn't be considered. Does that make sense? On Wed, Jan 28, 2015 at 5:18 AM, Corinna Vinschen <corinna-cygwin AT cygwin DOT com> wrote: > On Jan 27 15:02, Cary Lewis wrote: >> On Tue, Jan 27, 2015 at 4:09 AM, Corinna Vinschen >> <corinna-cygwin AT cygwin DOT com> wrote: >> > On Jan 26 11:14, Cary Lewis wrote: >> >> I am using cygrunsrv to install a windows service that creates an ssh tunnel. >> >> >> >> I have configured the service to auto-restart on failures using the >> >> windows 7 services.msc tool. >> >> >> >> If the ssh program exists, or is killed, cygrunsrv gracefully exits, >> >> and the windows auto-restart logic is not invoked. >> >> >> >> Is there a way to get the auto-restart logic to work? >> > >> > Try the cygrunsrv option --neverexits. If this option is set, the >> > service exits without notifying Windows. SCM thinks the service has >> > exited prematurely and restarts it, if auto-restart has been configured. >> > >> >> Corinna, thanks for the tip >> >> --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. > > > Thanks, > Corinna > > -- > Corinna Vinschen Please, send mails regarding Cygwin to > Cygwin Maintainer cygwin AT cygwin DOT com > Red Hat -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |