Mail Archives: cygwin-apps/2002/01/17/18:32:32
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 -