You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bj...@locus.apache.org on 2000/04/20 16:36:55 UTC

cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

bjh         00/04/20 07:36:55

  Modified:    src/lib/apr/threadproc/os2 proc.c
  Log:
  OS/2: Now that we have non-blocking pipes, set them to blocking if requested
  when creating pipes to a spawned process.
  
  Revision  Changes    Path
  1.20      +27 -0     apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- proc.c	2000/04/14 15:58:48	1.19
  +++ proc.c	2000/04/20 14:36:54	1.20
  @@ -101,17 +101,44 @@
                                      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;