delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/01/28/11:02:48

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
:content-transfer-encoding; q=dns; s=default; b=yvRoCoL4c0siUSq3
BJ2n51FQ5mqlBtuVwAp4BRqtH7ViPiISE7BrRjcvhWTzspcjmI7e1AroZQ3yNiVP
OpFvr+LPqs090XVHER8WoL2tZmz5E5WgDx6+zX67bMkyPxqTItF/t16JXayMKoFX
HuJox+q23gqy1X86MYmfT6xDJ18=
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
:content-transfer-encoding; s=default; bh=tmlGGSzUU/552Lb5R/u9gt
Kwd9I=; b=GggCHB5xYwdi6d1QYjVWWtMiHBxHlls4ECxe4cKfHIGsLxhPbJSw/V
bbONB3wwkISUFiJ7c4JIfe+sVWkV+5eab/M9DuZ6UJ3Drv+PzhRoSK/rM0SgsGt/
lrRyRaX8N26TrQrKwPWaG7FzjtFDpvTATmw0y5HDhyqjIb9RxZ+Ps=
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=-0.2 required=5.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qg0-f51.google.com
MIME-Version: 1.0
X-Received: by 10.140.41.169 with SMTP id z38mr13584519qgz.56.1422460687209; Wed, 28 Jan 2015 07:58:07 -0800 (PST)
In-Reply-To: <20150128153705.GD14265@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> <20150128115518 DOT GZ14265 AT calimero DOT vinschen DOT de> <CAO2ddnY+fk_CwGTZVyN7u6upZDxOrTbVjUVRCeGj8KBLEDPgig AT mail DOT gmail DOT com> <20150128153705 DOT GD14265 AT calimero DOT vinschen DOT de>
Date: Wed, 28 Jan 2015 16:58:07 +0100
Message-ID: <CAO2ddnaVMPhxtX03rMzAZnp1-ifmH+i0pPCYcS3SKrii4BDvgw@mail.gmail.com>
Subject: Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart
From: BGINFO4X <bginfo4x AT kztsoftware DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t0SG2jTa007315

2015-01-28 16:37 GMT+01:00 Corinna Vinschen <corinna-cygwin AT cygwin DOT com>:
> On Jan 28 15:42, Kizito Porta BalanyĆ  wrote:
>> 2015-01-28 12:55 GMT+01:00 Corinna Vinschen <corinna-cygwin AT cygwin DOT com>:
>> > On Jan 28 11:18, Corinna Vinschen wrote:
>> >> On Jan 27 15:02, Cary Lewis wrote:
>> >> > On Tue, Jan 27, 2015 at 4:09 AM, 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?
>>
>> 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.

    - But if the administrator defines the autorestart option, the
service should be aware of it.

I hope you understand me.

Thanks .


>
>> So, --neverxits should be the default behaviour of cygrunsrv , so
>> --neverexists shouldn't exist as an option. :) But perhaps I'm wrong
>> and I don't understand completely the problem.
>
> I disagree.  Automatic restart of services is not desired by default.
> It's a per-service, administrators choice.
>
>
> 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019