delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/01/17/18:32:32

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <3C475FB1.26A73DB7@wapme-systems.de>
Date: Fri, 18 Jan 2002 00:35:13 +0100
From: Stipe Tolj <tolj AT wapme-systems DOT de>
Organization: Wapme Systems AG
X-Mailer: Mozilla 4.7 [de]C-CCK-MCD QXW0322b (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: cygwin-apps <cygwin-apps AT cygwin DOT com>
Subject: apache-1.3.22-4 no-detach patch

Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------512CA3C0D2E4EF38C440A361
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Corinna,

could you please apply the attached patch against the last 1.3.22-3
source tree. This will turn detaching of the parent process off.
Please try if this makes cygrunsrv happy.

I haven't included any extra starting flag. In this case apache does
not detach by default for Cygwin. Any objections from the others?

Stipe

tolj AT wapme-systems DOT de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info AT wapme-systems DOT de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are
--------------512CA3C0D2E4EF38C440A361
Content-Type: text/plain; charset=us-ascii;
 name="apache_1.3.22-4-no-detach.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="apache_1.3.22-4-no-detach.diff"

diff -ur apache_1.3.22-3/src/include/ap_config.h apache_1.3.22-4/src/include/ap_config.h
--- apache_1.3.22-3/src/include/ap_config.h	Tue Jan  8 09:49:58 2002
+++ apache_1.3.22-4/src/include/ap_config.h	Thu Jan 17 23:26:59 2002
@@ -993,6 +993,7 @@
 #elif defined(CYGWIN)               /* Cygwin 1.x POSIX layer for Win32 */
 #define JMP_BUF jmp_buf
 #define NO_KILLPG
+#define NO_SETSID
 #define USE_LONGJMP
 #define GDBM_STATIC
 #define HAVE_MMAP 1
diff -ur apache_1.3.22-3/src/main/http_main.c apache_1.3.22-4/src/main/http_main.c
--- apache_1.3.22-3/src/main/http_main.c	Tue Jan  8 09:49:58 2002
+++ apache_1.3.22-4/src/main/http_main.c	Thu Jan 17 23:31:25 2002
@@ -3293,7 +3293,7 @@
     int x;
 
     chdir("/");
-#if !defined(MPE) && !defined(OS2) && !defined(TPF)
+#if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(CYGWIN)
 /* Don't detach for MPE because child processes can't survive the death of
    the parent. */
     if ((x = fork()) > 0)
@@ -3323,6 +3323,13 @@
 #elif defined(MPE)
     /* MPE uses negative pid for process group */
     pgrp = -getpid();
+#elif defined(CYGWIN)
+    /* Cygwin does not take any argument for setpgrp() */
+    if ((pgrp = setpgrp()) == -1) {
+	perror("setpgrp");
+	fprintf(stderr, "%s: setpgrp failed\n", ap_server_argv0);
+	exit(1);
+    }
 #else
     if ((pgrp = setpgrp(getpid(), 0)) == -1) {
 	perror("setpgrp");


--------------512CA3C0D2E4EF38C440A361--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019