This is the mail archive of the cygwin-apps@cygwin.com 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]

Re: Updated: cygrunsrv-0.92-2


On Thu, May 17, 2001 at 04:14:08PM -0500, Fred Yankowski wrote:
> Corinna,
> 
> I somehow overlooked Cygrunsrv until now.  Although I've been working
> on adding functionality into the PostgreSQL program to run as an NT
> service -- much as is done in inetd and ipc-daemon -- I'm tempted to
> use Cygrunsrv instead as a wrapper.  However, the PostgreSQL case has
> several needs that are not currently handled by Cygrunsrv, AFAICT:

As I already stated in the cygwin mailing list, cygrunsrv is work
in progress. I will gratefully accept patches which fix or extend
the behaviour of cygrunsrv besides what I do by myself.

> 1.  Some way to send specific signals to the daemon process to stop it
>     in both the stop and shutdown cases.

That's a real problem in Cygwin and NT. Sending signals to
a service is a Cygwin problem (yet) since the service is
running in another thread while signal handling in Cygwin only 
works reliable for the main thread.

Even worse: NT Shutdown is somewhat touchy. We should check what
we can do here.

> 2.  Ignore SIGHUP.

Cygrunsrv tries to install a signal handler for SIGHUP and others
which for the above reason results in ignoring them :-(

> 3.  Direct stdout/stderr to a logfile.

Yup, that's on the TODO list since yesterday.

> 4.  Specify dependency on other services.

Yup, that's a simple option for the command line.

> Do these seem like reasonable features to add to cygrunsrv?

Sure they do.

> I'm quite interested, because this could drastically change my
> approach to making postgres an NT service.  I've actually got it
> working pretty well now -- thanks in good part to your recent work on
> cygwin_recv() -- but it seems a shame to have all that
> service-management code in the postgres program itself.
> 
> I'm willing to help incorporate/patch such features into cygrunsrv, if
> that matters.

That would be really great :)

I think it's becoming more and more important to have a service
startup environment which cuddles Cygwin processes so that most
of the time nobody has to worry if a process can smoothly run as
NT service process as well.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


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