delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/05/06:06:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Mon, 5 Sep 2005 12:06:31 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygrunsrv.exe -- start the service automatically on failure??
Message-ID: <20050905100631.GB23702@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <ca40bd48050830231373fc94d3 AT mail DOT gmail DOT com> <SERRANODO3hRDT6Z3Ls000003c2 AT SERRANO DOT CAM DOT ARTIMI DOT COM>
Mime-Version: 1.0
In-Reply-To: <SERRANODO3hRDT6Z3Ls000003c2@SERRANO.CAM.ARTIMI.COM>
User-Agent: Mutt/1.4.2i

On Aug 31 11:48, Dave Korn wrote:
> ----Original Message----
> >From: Pradip Jadav
> >Sent: 31 August 2005 07:14
> 
> > Hello all,
> > As with  cygrunsrv.exe we can install-start-stop a service, is it
> > possible to restart the service automatically on failure??
> > We can see from properties of a service, a Recovery tab is available
> > where there are options like First failure, second failures,
> > subsequent failures to take an action on service fail.
> > I have set for my service(manually) as,
> > First failure                   -- Restart the Service
> > second failures             -- Restart the Service
> > subsequent failures       -- Restart the Service
> > So now my question is, "is it possible to set these options
> > automatically when we installs the service with cygrunsrv.exe so that
> > we need not to set it manually as I have done??""
> > thanx
> 
>   I'm afraid it's not currently possible, cygrunsrv does not have any
> options to set the restart settings.  It wouldn't be very hard to modify
> cygrunsrv; the restart options are presumably stored in the registry along
> with the other service parameters, so it would just be a matter of parsing a
> few more command-line options and writing a few extra registry key/values.
> http://cygwin.com/acronyms#PTC.

...which is to say, this would have to be accomplished by using the
ChangeServiceConfig2 function on systems which support it (W2K and
newer), not by manipulating registry keys directly.
http://cygwin.com/acronyms#PTC is still valid, of course.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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