summaryrefslogtreecommitdiff
path: root/threadproc/win32/proc.c
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-12-28 23:50:49 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-12-28 23:50:49 +0000
commit4e3d20f54305554d1469a63024b47824a37573e0 (patch)
treedb19fb3b04d25a636fb4becd5c38c8b1a47864ea /threadproc/win32/proc.c
parent367467cffe8363cd2d669693a94396794da8a646 (diff)
downloadlibapr-4e3d20f54305554d1469a63024b47824a37573e0.tar.gz
Substantial optimization of the os_level semantic. Since this is entirely
for internal consumption, and apr_initialize must be called, resolve the situation once and use the static, shared value for the remainder of the program execution. Next step is to allow conditional builds [excluding older 9x paths] if the user has no interest in 9x support. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62675 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/win32/proc.c')
-rw-r--r--threadproc/win32/proc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index 7749ad215..bd831759b 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -137,7 +137,7 @@ static apr_status_t make_inheritable_duplicate(apr_file_t *original,
if (original == NULL)
return APR_SUCCESS;
- /* Can't use apr_file_dup here because it creates a non-inhertible
+ /* XXX: Can't use apr_file_dup here because it creates a non-inhertible
* handle, and apr_open_file'd apr_file_t's are non-inheritable,
* so we must assume we need to make an inheritable handle.
*/
@@ -290,7 +290,6 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
apr_pool_t *cont)
{
apr_status_t rv;
- apr_oslevel_e os_level;
apr_size_t i;
char *cmdline;
char *pEnvBlock;
@@ -301,8 +300,6 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
new->err = attr->parent_err;
new->out = attr->parent_out;
- (void) apr_get_oslevel(cont, &os_level);
-
if (attr->detached) {
/* If we are creating ourselves detached, Then we should hide the
* window we are starting in. And we had better redfine our
@@ -311,7 +308,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* not manage the stdio handles properly when running old 16
* bit executables if the detached attribute is set.
*/
- if (os_level >= APR_WIN_NT) {
+ if (apr_os_level >= APR_WIN_NT) {
/*
* XXX DETACHED_PROCESS won't on Win9x at all; on NT/W2K
* 16 bit executables fail (MS KB: Q150956)
@@ -389,7 +386,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
++iEnvBlockLen;
#if APR_HAS_UNICODE_FS
- if (os_level >= APR_WIN_NT) {
+ if (apr_os_level >= APR_WIN_NT) {
apr_wchar_t *pNext;
pEnvBlock = (char *)apr_palloc(cont, iEnvBlockLen * 2);
dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
@@ -430,7 +427,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
}
#if APR_HAS_UNICODE_FS
- if (os_level >= APR_WIN_NT)
+ if (apr_os_level >= APR_WIN_NT)
{
STARTUPINFOW si;
apr_size_t nprg = strlen(progname) + 1;