You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@locus.apache.org on 2000/02/18 22:50:33 UTC

cvs commit: apache-2.0/src/lib/apr/file_io/win32 pipe.c

stoddard    00/02/18 13:50:33

  Modified:    src/lib/apr/file_io/win32 pipe.c
  Log:
  CreatePipe() returns 0 on failure, not -1. Return correct error status
  on failure.
  
  Revision  Changes    Path
  1.5       +2 -2      apache-2.0/src/lib/apr/file_io/win32/pipe.c
  
  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/pipe.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- pipe.c	2000/02/15 00:15:45	1.4
  +++ pipe.c	2000/02/18 21:50:32	1.5
  @@ -81,8 +81,8 @@
       (*out)->cntxt = cont;
       (*out)->fname = ap_pstrdup(cont, "PIPE");
   
  -    if (CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 0) == -1) {
  -        return errno;
  +    if (!CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 0)) {
  +        return GetLastError();
       }
   
       return APR_SUCCESS;