summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2007-10-30 11:18:10 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2007-10-30 11:18:10 +0000
commit0643bd4516db79f3d081cd07eb26346320e1d9ac (patch)
tree5eb9912e7d3810dd0b68d8863fb2541358661553 /threadproc
parent05215432063cc583943361b7795a9f44ab27b5e4 (diff)
downloadlibapr-0643bd4516db79f3d081cd07eb26346320e1d9ac.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: http://svn.apache.org/repos/asf/apr/apr/trunk@590037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-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);