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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=CI4lagCzXnWrOyR7jjg9HP6TkFoXRCekx+Do3YB/JuznZZ645x6br | |
sfY59nlvlZSNEqHamgiTi9O2M4Hu36dT8G0Te0dDY5j4PYHrzJC+x1SVXTomMGED | |
XTHjIGRj3wX7td5WvCEuTAl+DtUhtA7fg2ovKyOF/Xp0V0kgC/EVeM= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=5aZynfbToiHWG4YuugChTOtXaPQ=; b=Xm38Px/dhiVLkz1SaoS7nkwzoXsi | |
tjbO6LpwjvIGF93642gnYK2EfmJKpZE8DsjiVL4XK43ms3TnAziecU+DHjtTK0pG | |
dxmW98E/9PgAdjFqADD+Y4bwn5kVwCy3IYfjlqeKPsAxlHQB8YhzstCvYGEk/64L | |
zQiDwEQuVjbviSg= | |
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-Spam-SWARE-Status: | No, score=-5.0 required=5.0 tests=AWL autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Wed, 28 Jan 2015 11:18:33 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart |
Message-ID: | <20150128101833.GX14265@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
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> |
MIME-Version: | 1.0 |
In-Reply-To: | <CAEF1h+XeFp_OCDNo-ok_EW=-1h94=mQRRz_ucZsix4wmow+WvQ@mail.gmail.com> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--PaACFu8FWA0UZxdw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > > >=20 > Corinna, thanks for the tip >=20 > --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 --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --PaACFu8FWA0UZxdw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUyLd5AAoJEPU2Bp2uRE+g8EwQAJdCxKcwaxH/izielS47TYTc 41dIwkHbIKDRqyN4O/tEqZBMsmX+HfcabK4UJru/sZrkGKUf0C4djDCW2tldjGjB yHqOnrh9ZN09ts2Bt+w3XfcdSuA1QrPAK93IYmSa5oxVnVP46sg8aMaV7o1aE3qs 5spzOrkvykBZ4W0rQRp7LIGVxACpYd7ns2fWHJNZ+omqwGcl8v0cLYFT5F9eH0cI k/8vrYpxbF80kyjqPcQZdbGmUU5uimisYYBJBjHZ1G4l7nfBU5wb+vm78zdxoPol C6YZBCnyw4IyD/RNorVZ/CtF6f4v5KmAJYOBEVcqaDUVUJi5b/W+Twn7w5PHWuzs aMoGzqCNZUHCrE4oGWkn/5QgX52BqE3U5spKVG4ULVlBqxxglFU3TKasU1v6JiB0 SWXHfeBXJXmxmyz1Tigsim64FyoaEWSs3Yi5a/W5bTTgVXmjD3mjAZ/xuTxzfAhh r2khQgKolk07Vhna9mQtGkKEPMbUQ93AVK8tWUPnSMEseQKnahiyjj/3cDLlY+ZD GD6drHdg8f89G/RND6OAAqKLJCPh276OCF6i39di7W5CC6aasVqOs8RsaMN/0wYW 58iY5jlbckZltM+WDrBj+XaHC8D0mJwlFLgzZbI9SoGp0KyliBSlQxiwAywOdlJW xDzRsVTThsJTCAPnwmCP =iqAo -----END PGP SIGNATURE----- --PaACFu8FWA0UZxdw--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |