aboutsummaryrefslogtreecommitdiff
path: root/file_io/unix
Commit message (Collapse)AuthorAge
...
* Set file/socket descriptor to -1 before close(), so that there is no chanceBojan Smojver2009-11-01
| | | | | | of returning an already closed FD from apr_os_file_get()/apr_os_sock_get(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@831641 13f79535-47bb-0310-9956-ffa450edef68
* TMPDIR is the canonical prefered envvar to useJim Jagielski2009-09-25
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@818841 13f79535-47bb-0310-9956-ffa450edef68
* Link again on OS X, where fdatasync() does not seem to exist.Sander Striker2009-07-11
| | | | | | | | | | * configure.in Add check for fdatasync. * file_io/unix/readwrite.c (apr_file_datasync): Use fsync when fdatasync is not available. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@793192 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_file_sync() and apr_file_datasync() calls.Bojan Smojver2009-06-14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@784633 13f79535-47bb-0310-9956-ffa450edef68
* Retain the INHERIT/NOCLEANUP flags of new_file in apr_file_dup2().Bojan Smojver2009-06-11
| | | | | | Patch by Stefan Fritsch <sf sfritsch.de>. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@783958 13f79535-47bb-0310-9956-ffa450edef68
* Only set CLOEXEC on dup() if both NOCLEANUP and INHERIT flags are clear.Bojan Smojver2009-03-03
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749810 13f79535-47bb-0310-9956-ffa450edef68
* * One missing unroll of APR_SET_FD_CLOEXEC.Ruediger Pluem2009-02-27
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748565 13f79535-47bb-0310-9956-ffa450edef68
* Unroll APR_SET_FD_CLOEXEC macro.Bojan Smojver2009-02-27
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748371 13f79535-47bb-0310-9956-ffa450edef68
* fix unused variable warning for builds without HAVE_DUP3Jeff Trawick2009-02-27
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748361 13f79535-47bb-0310-9956-ffa450edef68
* Set CLOEXEC flags where appropriate. Either use new O_CLOEXEC flag andBojan Smojver2009-02-26
| | | | | | | | | | | associated functions, such as dup3(), accept4(), epoll_create1() etc., or simply set CLOEXEC flag using fcntl(). Patch by Stefan Fritsch <sf sfritsch.de> and Arkadiusz Miskiewicz <arekm pld-linux.org>. PR 46425. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@747990 13f79535-47bb-0310-9956-ffa450edef68
* Fix documentation for apr_temp_dir_get().Bojan Smojver2009-01-06
| | | | | | | PR 46303. Patch by Carlo Marcelo Arenas Belon <carenas sajinet.com.pe>. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@731793 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug with the APR_DELONCLOSE flag. Child processes were (also)Greg Stein2008-11-10
| | | | | | | | | | | | | | unlinking the file. Badness ensued. * file_io/unix/open.c: (file_cleanup): add new parameter to tell whether the function was invoked by the child's cleanup, or the regular cleanup. use it to determine whether to unlink the file. (apr_unix_file_cleanup, apr_unix_child_file_cleanup): pass appropriate value to file_cleanup(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@712674 13f79535-47bb-0310-9956-ffa450edef68
* Moved new apr_file_link() function to open.c for all platformsThomas J. Donovan2008-07-25
| | | | | | | | Fixed args & return value for Windows. re: PR 44841 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@679652 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_file_link() function.Bojan Smojver2008-07-25
| | | | | | | PR 44841. Patch by Mark Heily <mark heily.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@679630 13f79535-47bb-0310-9956-ffa450edef68
* Rework possibly non-portable constant expressionBojan Smojver2008-04-25
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@651721 13f79535-47bb-0310-9956-ffa450edef68
* Remove APR_BUFSIZ definition, as it would only be used in one placeBojan Smojver2008-04-25
| | | | | | Put buffer sizing directly into the only function that uses it. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@651704 13f79535-47bb-0310-9956-ffa450edef68
* Make copy buffer biggerBojan Smojver2008-04-24
| | | | | | PR #44193 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@651174 13f79535-47bb-0310-9956-ffa450edef68
* AIX C compiler won't add to void * in picky modeJeff Trawick2007-10-29
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@589846 13f79535-47bb-0310-9956-ffa450edef68
* Pick up AIX 5.2 onwardsWilliam A. Rowe Jr2007-10-17
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@585348 13f79535-47bb-0310-9956-ffa450edef68
* Fill in apr_fileinfo_t member st_csize on Netware and UnixWilliam A. Rowe Jr2007-10-17
| | | | | | | | | | | | | | And refine the file times down to apr_time_t resolution if supported by a st_atimensec or st_atim.tv_nsec value by the OS. Additional msec implementations are possible if exposed through autoconf. PR: 41678 Authored by: William Rowe, Nicklas Edmundsson <nikke acc.umu.se> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@585343 13f79535-47bb-0310-9956-ffa450edef68
* * Return APR_SUCCESS by default.Ruediger Pluem2007-10-14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584543 13f79535-47bb-0310-9956-ffa450edef68
* Small cut and paste 'feature'. (Ok, can't be a feature if it doesn't even ↵William A. Rowe Jr2007-10-14
| | | | | | compile). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584497 13f79535-47bb-0310-9956-ffa450edef68
* Had inverted read/write.William A. Rowe Jr2007-10-14
| | | | | | | | This is why you don't do things like this, in/out is ambiguous. (you write things in-to a pipe and read things out-of a pipe, well except in APR ;-) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584489 13f79535-47bb-0310-9956-ffa450edef68
* Enhance our file_io in APR 1.3 with apr_file_pipe_create_ex(),William A. Rowe Jr2007-10-14
| | | | | | | | | | | | | | | which should replace apr_file_pipe_create() in apr 2.0. Trivial, this sets up blocking and nonblocking flavors of either pipe end. Obviously this code shrinks up threadproc/*/proc.c quite nicely. This eliminates a major class of portability concerns. On Win32, I take this one step further and fix the pipe creation logic so that nonblock pipes are always set to timeout of 0, per Eric's earlier proc.c patch. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584487 13f79535-47bb-0310-9956-ffa450edef68
* In Mac OS X's VFS API file names are, by definition, canonicallyJim Jagielski2007-08-13
| | | | | | | | decomposed Unicode, encoded using UTF-8. Shortest rep also uses composed UTF-8 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@565326 13f79535-47bb-0310-9956-ffa450edef68
* Rework apr_file_writev_full so it tries to writev() data before resorting toDavi Arnaut2007-07-06
| | | | | | | a plain write. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@553682 13f79535-47bb-0310-9956-ffa450edef68
* Register a cleanup only if APR_FILE_NOCLEANUP was not flagged.William A. Rowe Jr2007-06-01
| | | | | | | | Submitted by: Brian J. France <list firehawksystems.com> Reviewed by: wrowe, bojan git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@543555 13f79535-47bb-0310-9956-ffa450edef68
* Discard file buffers when running cleanups for exec.Bojan Smojver2007-05-15
| | | | | | | PR 41119. Original patches by Davi Arnaut. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@538045 13f79535-47bb-0310-9956-ffa450edef68
* Avoid calling apr_file_flush_locked() on an unlocked file.Bojan Smojver2007-05-14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@538019 13f79535-47bb-0310-9956-ffa450edef68
* Revert nested mutexes in Unix file_ioBojan Smojver2007-05-14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@538009 13f79535-47bb-0310-9956-ffa450edef68
* Avoid compiler warning (rv only used if HAVE_WRITEV).Bojan Smojver2007-05-12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@537402 13f79535-47bb-0310-9956-ffa450edef68
* Improve thread safety of assorted file_io functions.Bojan Smojver2007-05-12
| | | | | | Patches by Davi Arnaut. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@537393 13f79535-47bb-0310-9956-ffa450edef68
* The file pointer position must be recalculated and set when writev()ing to aBojan Smojver2007-05-11
| | | | | | | buffered file. Fix by Davi Arnaut for bug #40963 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@537066 13f79535-47bb-0310-9956-ffa450edef68
* apr_dir_read returned ENOENT instead of APR_ENOENTWilliam A. Rowe Jr2007-04-18
| | | | | | | | PR: 41238 Submitted by: Lucian Adrian Grijincu <Lucian.Grijincu gmail.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@529816 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c: Minor style fixes, no functional change:Joe Orton2007-04-02
| | | | | | | non-public functions shouldn't have the apr_ prefix; wrap a long line. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@524822 13f79535-47bb-0310-9956-ffa450edef68
* Fix locking bug with apr_file_read()/apr_file_gets()Bojan Smojver2007-03-31
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@524355 13f79535-47bb-0310-9956-ffa450edef68
* Only try to flush when the file is in buffered mode, inside apr_file_writev.Paul Querna2007-03-01
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@513205 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_file_writev when buffering is enabled by forcing a flush, rather ↵Paul Querna2007-02-28
| | | | | | | | | | than writing underneath the write buffer. PR: 41197 Submitted By: Davi Arnaut git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@512882 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c (apr_file_writev): Fix variable type andJoe Orton2007-01-07
| | | | | | | spelling in comment. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@493799 13f79535-47bb-0310-9956-ffa450edef68
* Portably check for EEXIST in the mktemp code.Garrett Rooney2006-10-26
| | | | | | | | | | | | | | Submitted by: Kenneth Golomb <KGolomb TradeCard.com> PR: 40818 * file_io/unix/mktemp.c (gettemp): Use APR_STATUS_IS_EEXIST instead of comparing directly against APR_EEXIST. * CHANGES: Note change. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@468055 13f79535-47bb-0310-9956-ffa450edef68
* Solve svn issue 1869, only one symptom on the Unix platform; when William A. Rowe Jr2006-09-21
| | | | | | | | | | | | | a trailing .. element is present without a trailing slash, always avoid appending a trailing slash. Solved with hints from Lieven Govaerts <lgo mobsol.be>. Resolves test fail identified by test/testnames.c commit 424831 Crossports: patch 424914 from Win32 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@448480 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-03
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-03
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Identify several mutex-unprotected flushesWilliam A. Rowe Jr2006-03-10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@384942 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/seek.c (setptr): Tidy up error handling a little; useJoe Orton2005-10-19
| | | | | | | | apr_status_t, use rv not rc, check lseek return value directly, use explicit APR_SUCCESS. No functional change. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@326597 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/seek.c (setptr): Don't ignore errors fromJoe Orton2005-10-19
| | | | | | | | | apr_file_flush. * test/testfile.c (test_fail_read_flush): Add test. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@326593 13f79535-47bb-0310-9956-ffa450edef68
* buffer.c, where the new variable file buffer functions are stored. Colm MacCarthaigh2005-10-18
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@326117 13f79535-47bb-0310-9956-ffa450edef68
* Add apr-wide definitions and unix implementation of apr_file_buffer_set() and Colm MacCarthaigh2005-10-18
| | | | | | | | apr_file_buffer_size_get() functions, to support variable buffer sizes for file handles. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@326116 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_file_open_flags_std[err|out|in]() functions, to allow the opening ofColm MacCarthaigh2005-10-15
| | | | | | | | | the standard file descriptors with specific flags set. As a consequence we now also set APR_WRITE and APR_READ as appropriate when using the plain old apr_file_open_std[err|out|in]() functions. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@321314 13f79535-47bb-0310-9956-ffa450edef68
* * include/arch/unix/apr_arch_file_io.h: Define APR_USE_READDIR64_R toJoe Orton2005-09-27
| | | | | | | | | | avoid cases where readdir() is used in place of readdir_r even if readdir64_r is available. * file_io/unix/dir.c (apr_dir_read): Use APR_USE_READDIR64_R. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@291973 13f79535-47bb-0310-9956-ffa450edef68