delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/13/18:55:25

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 13 Jul 2001 15:54:55 -0700 (PDT)
Message-Id: <20010713.155455.01368882.Takaaki.Ota@am.sony.com>
To: freeweb AT nyckelpiga DOT de
Cc: cygwin AT cygwin DOT com
Subject: Re: Starting Apache
From: Tak Ota <Takaaki DOT Ota AT am DOT sony DOT com>
In-Reply-To: <3B4D5FCD.17066.181BF3@localhost>
References: <20010711 DOT 225529 DOT 01368552 DOT Takaaki DOT Ota AT am DOT sony DOT com>
<3B4D5FCD DOT 17066 DOT 181BF3 AT localhost>
X-Mailer: Mew version 2.0 pre2 on Emacs 21.0.104.1 / Mule 5.0 (SAKAKI)
X-Telephone: +1-858-942-3239
X-Fax------: +1-858-942-9142
X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804
Organization: Sony Electronics Inc.
Mime-Version: 1.0

I wonder if things written in this page are true.

  http://apache.dev.wapme.net/manual/cygwin.html#serv

/usr/doc/Cygwin/cygrunsrv.README mentions the caveat about running
daemon that forks.  httpd is such a daemon therefore it is not
possible to control httpd by -S and -E.  The direct child created by
cygrunsrv will not stay alive.

Even with this understanding there still is a fact that I cannot
explain its mechanism.  Though httpd quits from cygrunsrv point of
view the forked background child processes should continue to run
however this is not the case.  After service installation by

  cygrunsrv -I apache -p /usr/local/apache/bin/httpd

"cygrunsrv -S apache" does not leave any new processes.  Instead, it
produces the next error.

$ cygrunsrv -S apache
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

Next, I tried to run httpd as a normal process instead of a daemon.
Although it is not recommended httpd has an option -X for debugging
purpose to keep httpd running without forking.  I've tried the
following for installing the service.

  cygrunsrv -I apache -p /usr/local/apache/bin/httpd -a -X

Somehow this does not work either.  I get the same 1062 error.

There is another mysterious and unexplainable fact.  When I open two
Cygwin terminal windows and run /usr/local/apache/bin/httpd manually
from one of the terminal, it forks off the background process and
comes back to the bash prompt.  From both of the terminal windows,
'ps' shows the httpd processes running.  What is strange is if I close
the window which started the httpd, all those background process are
terminated.  "Running Apache for Cygwin" section of the document
states:

  If installed to the default Apache layout directory you can start
  httpd as follows:

    $ /usr/local/apache/bin/httpd

  An explicit background & indicator is not required. The resulting
  parent process is detached from the current terminal. Check the
  global error_log to see if Apache has started cleanly without any
  major problems.

However, the fact seems to be the spawned processes are still bound to
the terminal thus terminated when the terminal closes.

Does anyone have answer to the above mystery?

-Tak


On Thu, 12 Jul 2001 08:29:01 +0100, freeweb AT nyckelpiga DOT de wrote:

> Am 11 Jul 2001, um 22:55 hat Tak Ota geschrieben:
> 
> Hi Tak,
> 
> > I just downloaded Apache 1.3.20.  It compiled/installed/ran out of the
> > box without any tweaking at all.  It was quite an impressive and
> > delightful experience.  Thank you.
> > 
> > BTW, I am now trying to automate the following work, in case I reboot
> > the machine.
> > 
> > /usr/local/apache/bin/apachectl start
> > 
> > What is the equivalent mechanism as /etc/rc.d/init.d/ under Cygwin?
> 
> Install it as a service with cygrunsrv:
> 	http://apache.dev.wapme.net/manual/cygwin.html#serv
> 
> gph
> 
> 
> -- 
> =^..^=
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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