This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Corinna Vinschen <cygwin at cygwin dot com>, cygwin at cygwin dot com
- Date: Wed, 28 Jan 2015 15:40:54 +0300
- Subject: Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart
- Authentication-results: sourceware.org; auth=none
- 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>
- Reply-to: cygwin at cygwin dot com
Greetings, Corinna Vinschen!
>> --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?
For me, yes.
> The patch is simple and I could upload a new cygrunsrv today or tomorrow.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 28.01.2015, <15: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