apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/file_io/unix mktemp.c
Date Tue, 18 Mar 2003 19:01:47 GMT
wrowe       2003/03/18 11:01:46

  Modified:    file_io/unix mktemp.c
  Log:
    Document an obvious problem lacking a simple solution - if we simply
    propogate flags as passed without enforcing their values - the rest
    of APR code will make invalid assumptions.
  
  Revision  Changes    Path
  1.28      +7 -0      apr/file_io/unix/mktemp.c
  
  Index: mktemp.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/mktemp.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mktemp.c	7 Jan 2003 00:52:53 -0000	1.27
  +++ mktemp.c	18 Mar 2003 19:01:46 -0000	1.28
  @@ -225,6 +225,13 @@
       if (fd == -1) {
           return errno;
       }
  +    /* XXX: We must reset several flags values as passed-in, since
  +     * mkstemp didn't subscribe to our preference flags.
  +     *
  +     * We either have to unset the flags, or fix up the fd and other
  +     * xthread and inherit bits appropriately.  Since gettemp() above
  +     * calls apr_file_open, our flags are respected in that code path.
  +     */
       apr_os_file_put(fp, &fd, flags, p);
       (*fp)->fname = apr_pstrdup(p, template);
   
  
  
  

Mime
View raw message