summaryrefslogtreecommitdiff
path: root/threadproc/os2
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2007-10-30 11:18:10 +0000
committerBrian Havard <bjh@apache.org>2007-10-30 11:18:10 +0000
commitabc30c5838631838036d434b8c3c02162be2adac (patch)
tree5eb9912e7d3810dd0b68d8863fb2541358661553 /threadproc/os2
parent414bfb635e6b11cadfc17a6115142cae2d007dd2 (diff)
downloadapr-abc30c5838631838036d434b8c3c02162be2adac.tar.gz
Fix build breakage due to syntax errors in threadproc/os2/proc.c.
I haven't yet verified that the code works but this is a step in the right direction. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@590037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/os2')
-rw-r--r--threadproc/os2/proc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c
index 9fd9a5f50..d05666dec 100644
--- a/threadproc/os2/proc.c
+++ b/threadproc/os2/proc.c
@@ -130,9 +130,11 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_fi
== APR_SUCCESS)
rv = apr_file_inherit_set(attr->child_in);
}
+ }
if (parent_in != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_in, parent_in, attr->pool);
+ }
return rv;
}
@@ -161,6 +163,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
if (parent_out != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
+ }
return rv;
}
@@ -189,6 +192,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
if (parent_err != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
+ }
return rv;
}
@@ -499,25 +503,22 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
chdir(savedir);
}
- if (attr->child_in) {
- (attr->child_in->filedes != -1)
- apr_file_close(attr->child_in);
+ if (attr->child_in && (attr->child_in->filedes != -1)) {
+ apr_file_close(attr->child_in);
dup = STDIN_FILENO;
DosDupHandle(save_in, &dup);
DosClose(save_in);
}
- if (attr->child_out) {
- (attr->child_err->filedes != -1)
- apr_file_close(attr->child_out);
+ if (attr->child_out && attr->child_err->filedes != -1) {
+ apr_file_close(attr->child_out);
dup = STDOUT_FILENO;
DosDupHandle(save_out, &dup);
DosClose(save_out);
}
- if (attr->child_err) {
- (attr->child_err->filedes != -1)
- apr_file_close(attr->child_err);
+ if (attr->child_err && attr->child_err->filedes != -1) {
+ apr_file_close(attr->child_err);
dup = STDERR_FILENO;
DosDupHandle(save_err, &dup);
DosClose(save_err);