aboutsummaryrefslogtreecommitdiff
path: root/threadproc/os2/proc.c
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2000-04-20 14:36:54 +0000
committerBrian Havard <bjh@apache.org>2000-04-20 14:36:54 +0000
commitc63be048b8513451de8599f9a6723611a4b800b3 (patch)
tree429c3f51d0c10614f4bf4459688c40a5bc69c122 /threadproc/os2/proc.c
parent93686a433715895d51260fa78ae47d9144a6273d (diff)
downloadapr-c63be048b8513451de8599f9a6723611a4b800b3.tar.gz
apr-c63be048b8513451de8599f9a6723611a4b800b3.zip
OS/2: Now that we have non-blocking pipes, set them to blocking if requested
when creating pipes to a spawned process. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@59901 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/os2/proc.c')
-rw-r--r--threadproc/os2/proc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c
index 6964d3617..f8812b43f 100644
--- a/threadproc/os2/proc.c
+++ b/threadproc/os2/proc.c
@@ -101,18 +101,45 @@ ap_status_t ap_setprocattr_io(ap_procattr_t *attr, ap_int32_t in,
attr->cntxt)) != APR_SUCCESS) {
return stat;
}
+ switch (in) {
+ case APR_FULL_BLOCK:
+ ap_block_pipe(attr->child_in);
+ ap_block_pipe(attr->parent_in);
+ case APR_PARENT_BLOCK:
+ ap_block_pipe(attr->parent_in);
+ case APR_CHILD_BLOCK:
+ ap_block_pipe(attr->child_in);
+ }
}
if (out) {
if ((stat = ap_create_pipe(&attr->parent_out, &attr->child_out,
attr->cntxt)) != APR_SUCCESS) {
return stat;
}
+ switch (out) {
+ case APR_FULL_BLOCK:
+ ap_block_pipe(attr->child_out);
+ ap_block_pipe(attr->parent_out);
+ case APR_PARENT_BLOCK:
+ ap_block_pipe(attr->parent_out);
+ case APR_CHILD_BLOCK:
+ ap_block_pipe(attr->child_out);
+ }
}
if (err) {
if ((stat = ap_create_pipe(&attr->parent_err, &attr->child_err,
attr->cntxt)) != APR_SUCCESS) {
return stat;
}
+ switch (err) {
+ case APR_FULL_BLOCK:
+ ap_block_pipe(attr->child_err);
+ ap_block_pipe(attr->parent_err);
+ case APR_PARENT_BLOCK:
+ ap_block_pipe(attr->parent_err);
+ case APR_CHILD_BLOCK:
+ ap_block_pipe(attr->child_err);
+ }
}
return APR_SUCCESS;
}