delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/01/23:09:39

X-Spam-Check-By: sourceware.org
Message-ID: <45C2B96D.7E940183@dessent.net>
Date: Thu, 01 Feb 2007 20:09:17 -0800
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygrunsrv problem
References: <195b3f1f0702011826t1d25b864h2ab884eb9f92b341 AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
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

Wynfield Henman wrote:

> The "cygrunsrv -Q <name>"  definitely is buggy to me.
> When I started up my system "privoxy" is indeed up and running as it should be.
> 
> But, when I do a cygrunsrv -Q  it shows that the service is stopped,
> yet it isn't.

There's no bug here, just some misunderstanding on your part.

Privoxy detaches and demonizes on its own when you start it.  Cygrunsrv
is meant to be used with programs that do not detach themselves.  That
is why you must launch things such as "cron -D" and so on to tell it not
to demonize itself.  If the launched program demonizes itself then
cygrunsrv has no way to monitor when it has stopped, and it thinks the
binary has terminated immediately after starting.  Thus cygrunsrv itself
terminates and tells the system that the service has stopped, even
though the spawned privoxy binary might still be running, but the
service itself (which is cygrunsrv) is not actually running.

You can use the windows built-in "sc" command to verify that the service
isn't actually running, type "sc query privoxy" and it should agree with
whatever cygrunsrv -Q says.

If you want this to work you need to specify whatever option privoxy
uses to tell it not to detach.

Brian

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