summaryrefslogtreecommitdiff
path: root/threadproc/os2
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2004-06-23 12:20:44 +0000
committerJeff Trawick <trawick@apache.org>2004-06-23 12:20:44 +0000
commit7f38ac64549d4ff6a9d83710dd710cb03f5e4036 (patch)
tree343a492c412dbe3195a865b3a4be4a3ef95fa689 /threadproc/os2
parentb54baa3a50581c72a958961c42c530cde418fb86 (diff)
downloadapr-7f38ac64549d4ff6a9d83710dd710cb03f5e4036.tar.gz
Add command type APR_SHELLCMD_ENV for creating a process
which is started by the shell and which inherits the parent's environment variables. The immediate use for this is with Apache httpd's piped loggers, correcting a regression since 1.3. In general, applications starting child processes often want the child to run with the same environment variables, so this plugs a hole in the API. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65213 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/os2')
-rw-r--r--threadproc/os2/proc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c
index c0ff58407..4edb45221 100644
--- a/threadproc/os2/proc.c
+++ b/threadproc/os2/proc.c
@@ -333,7 +333,9 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
/* ### how to handle APR_PROGRAM_ENV and APR_PROGRAM_PATH? */
- if (attr->cmdtype == APR_SHELLCMD || strcasecmp(extension, ".cmd") == 0) {
+ if (attr->cmdtype == APR_SHELLCMD ||
+ attr->cmdtype == APR_SHELLCMD_ENV ||
+ strcasecmp(extension, ".cmd") == 0) {
strcpy(interpreter, "#!" SHELL_PATH);
extra_arg = "/C";
} else if (stricmp(extension, ".exe") != 0) {