You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/06/06 05:28:37 UTC
cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
wrowe 2002/06/05 20:28:37
Modified: server/mpm/winnt mpm_winnt.c
Log:
Experimental patch to work around Win32 services defaulting cwd() to
c:\win\system32 when invoking new service processes.
Revision Changes Path
1.277 +9 -1 httpd-2.0/server/mpm/winnt/mpm_winnt.c
Index: mpm_winnt.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -r1.276 -r1.277
--- mpm_winnt.c 24 May 2002 16:58:23 -0000 1.276
+++ mpm_winnt.c 6 Jun 2002 03:28:37 -0000 1.277
@@ -2197,7 +2197,15 @@
* may have extra StartService() command arguments to
* add for us.
*
- * Any other process has a console, so we don't to begin
+ * The SCM will generally invoke the executable with
+ * the c:\win\system32 default directory. This is very
+ * lethal if folks use ServerRoot /foopath on windows
+ * without a drive letter. Change to the default root
+ * (path to apache root, above /bin) for safety.
+ */
+ SetCurrentDirectory(def_server_root);
+
+ /* Any other process has a console, so we don't to begin
* a Win9x service until the configuration is parsed and
* any command line errors are reported.
*