This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygrunsrv problem


Brian,
 thanks for the informative explanation about cygrunsrv and demon processes.

On 2/2/07, Brian Dessent <brian@dessent.net> wrote:
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/



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]