commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-commons/daemon/src/native/nt/procrun/apps/prunsrv prunsrv.c
Date Tue, 10 Aug 2004 11:13:28 GMT
mturk       2004/08/10 04:13:28

  Modified:    daemon/src/native/nt/procrun/apps/prunsrv prunsrv.c
  Log:
  Use the provided --Environment and pass it's values to JVM.
  
  Revision  Changes    Path
  1.5       +19 -0     jakarta-commons/daemon/src/native/nt/procrun/apps/prunsrv/prunsrv.c
  
  Index: prunsrv.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/nt/procrun/apps/prunsrv/prunsrv.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- prunsrv.c	25 Jun 2004 10:23:43 -0000	1.4
  +++ prunsrv.c	10 Aug 2004 11:13:28 -0000	1.5
  @@ -333,6 +333,22 @@
       }
   }
   
  +static void setInprocEnvironment()
  +{
  +    LPWSTR p, e;
  +
  +    if (!SO_ENVIRONMENT)
  +        return;    /* Nothing to do */
  +    
  +    for (p = SO_ENVIRONMENT; *p; p++) {
  +        e = apxExpandStrW(gPool, p);
  +        _wputenv(e);
  +        apxFree(e);
  +        while (*p)
  +            p++;
  +    }
  +}
  +
   /* Load the configuration from Registry
    * loads only nonspecified items
    */
  @@ -851,6 +867,9 @@
               /* If the Working path is specified change the current directory */
               SetCurrentDirectoryW(SO_STARTPATH);
           }
  +        /* Set the environment using putenv, so JVM can use it */
  +        setInprocEnvironment();
  +        /* Create the JVM glbal worker */
           gWorker = apxCreateJava(gPool, _jni_jvmpath);
           if (IS_INVALID_HANDLE(gWorker)) {
               apxLogWrite(APXLOG_MARK_ERROR "Failed creating java %S", _jni_jvmpath);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message