Subject: Re: Odd fork behavior- W95/b16
From: [email-masked]

7 Dec 1996 03:12:28 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (DJ Delorie)
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "DJ Delorie" at Oct 23, 96 08:43:10 am
X-Mailer: ELM [version 2.4 PL25 PGP2]
Content-Length: 2104      
Original-Sender: [email-masked]

> 
> 
> > Start your program with full qualified path 
> > (/home/local/etc/httpd/src/httpd). There is a small bug in cygwin code - 
> > fork tries to run program, specified in argv[0], and, if program changed 
> > current directory before fork, fork() fails. For example, in
> 
> I discovered that, in some cases, you must provide the drive letter
> also:
> 
> 	d:\www\httpd
> 
> *My* problem with fork() is that (with apache, at least), when it
> calls fork() to spawn the first child, fork() uses 100% of the CPU and
> never returns.
> -

Hi Delorie, hi cygwin hackers,

I've finally got the mail archive and found that others too have tried
to compile apache and got same problems as me.

I've found (or thought) that the problem comes from a corrupted memory area
after the child is running.

I was able to have apache running whith the httpd -X command (don't spawn child
, run as signle program).

One of the problems is that it crash when it get a SIGNAL that have to killpg,
both if you use kill (-ppid) or if you use killpg (not implemented).

The other is that if you commented out that part of signaling (in httpd_main.c)
it keep don't working, with a series of errors like:
accept: ivalid argument, when it came to put the children listen on the sockets.

Anyone has understood better what it happen?

Any hints?

ciao,
-giovanni
-- 

          ***********************************************
          *                                             *
          *                                             *
          *    MATRICE srl                              *
          *    Information Technology Solutions         *
          *                                             *
          *    Giovanni Maruzzelli                      *
          *                                             *
          *                                             *
          *                                             *
          *    [email-masked]                        *
          *                                             *
          ***********************************************
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".