delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/01/29/04:13:16

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=xW/bRPuQFxrsiNCE
lRVzFbdjJ4BKdmQfTd3MZO/Gm3yv9ya5lycwp4BNScQwG3+1wjf41deFv23nAhZf
BRqqGbvXemulewodSIN+bfx/DUuKGeYr9kXADMNPb1Sm1wYMUHrEhhM4CbX/IyuY
bbwGZmBRY1bZT7YyspUIagU4mCw=
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=XJ+l7F84OIp3xd1dt+Sgzz
650eY=; b=Tn8rAyYd8w1yf+6ukcJgJy5azCn7YNd82O7y+X9EMgRen8gWwu2K1x
pH6yet4D3UveAdTl9ygMuydy3AnonOVRiFp2WgmbQRimILN5DZvF9xjbwAFG4yNW
boBbyiqKvIAIN/C1j/4Dpauv7UtBly1LxvMPc3MTrl+Ixvn/ZjCpA=
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=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qg0-f54.google.com
MIME-Version: 1.0
X-Received: by 10.140.31.36 with SMTP id e33mr276592qge.36.1422522718942; Thu, 29 Jan 2015 01:11:58 -0800 (PST)
In-Reply-To: <20150128204359.GH14265@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> <CAO2ddnaVMPhxtX03rMzAZnp1-ifmH+i0pPCYcS3SKrii4BDvgw AT mail DOT gmail DOT com> <20150128204359 DOT GH14265 AT calimero DOT vinschen DOT de>
Date: Thu, 29 Jan 2015 10:11:58 +0100
Message-ID: <CAO2ddnZj7xHccCm8jT1fvdCQBTdS58LBfvi=nCOMJizBiGd5mg@mail.gmail.com>
Subject: Re: cygrunsrv - services enters stopped state if underlying program exits or is killed - doesn't auto restart
From: =?UTF-8?Q?Kizito_Porta_Balany=C3=A0?= <kfeina AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t0T9DCFW019999

2015-01-28 21:43 GMT+01:00 Corinna Vinschen <corinna-cygwin AT cygwin DOT com>:
> On Jan 28 16:58, BGINFO4X wrote:
>> 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>:
>> >> >> 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.
>
> Ok, I get your drift.  You're right, but this is a bit more complicated
> than the simple tweak I applied to cygrunsrv today.
>
> There's certainly room for improvement in cygrunsrv.  It's showing its
> age, most of the code is unchanged since Cygwin still supported NT4.
> It's not using the QueryServiceConfig2/ChangeServiceConfig2 functions at
> all.
>
> I wouldn't be too unhappy about a developer having fun to improve
> cygrunsrv...

Hello, I can't develop it. I don't have the level. But ...

Perhaps the author of nssm can do it (http://nssm.cc/). I could send
an email to him ... for example .....

Or perhaps there is code there (nssm is public doamin) that can be
useful for cygrunsrv .

Note: nssm is a windows program very similar to cygrunsrv.

"nssm is a service helper which doesn't suck. srvany and other service
helper programs suck because they don't handle failure of the
application running as a service. If you use such a program you may
see a service listed as started when in fact the application has died.
nssm monitors the running service and will restart it if it dies. With
nssm you know that if a service says it's running, it really is.
Alternatively, if your application is well-behaved you can configure
nssm to absolve all responsibility for restarting it and let Windows
take care of recovery actions.

nssm logs its progress to the system Event Log so you can get some
idea of why an application isn't behaving as it should.

nssm also features a graphical service installation and removal
facility. Prior to version 2.19 it did suck. Now it's quite a bit
better."


Regards.
>
> 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