summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2000-04-20 14:36:54 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2000-04-20 14:36:54 +0000
commit4bc082699f3d6e14dfcc885cec8c1b12eb80b4dc (patch)
tree429c3f51d0c10614f4bf4459688c40a5bc69c122 /threadproc
parent8f56112ec007ab804f1d931c8722f5b9fbf8f450 (diff)
downloadlibapr-4bc082699f3d6e14dfcc885cec8c1b12eb80b4dc.tar.gz
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: http://svn.apache.org/repos/asf/apr/apr/trunk@59901 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-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;
}