| Commit message (Collapse) | Author | Age |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1918296 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
default unless APR_FULL_BLOCK was used; unconditionally set the
blocking state later. Saves two syscalls per invocation for both
APR_READ_BLOCK and APR_WRITE_BLOCK, no [intended] functional change.
Github: closes #56
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1918258 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: Test for working pipe2().
* file_io/unix/pipe.c (file_pipe_create): Use pipe2(,O_NONBLOCK) if
APR_FULL_NONBLOCK is requested.
* test/testpipe.c (nonblock_pipe): New test.
Github: closes #55
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1917641 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file_bucket_setaside().
apr_file_setasidea() needs to invalidate the old file descriptor per semantics:
* @remark After calling this function, old_file may not be used
So to avoid the setaside issue with splitted file buckets, file_bucket_setaside()
will now apr_file_dup() instead of apr_file_setaside() when the bucket is shared
(i.e. refcount > 1).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893445 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
There is no cleanup with APR_FOPEN_NOCLEANUP, so apr_pool_cleanup_kill() can
go in the !(old_file->flags & APR_FOPEN_NOCLEANUP) block.
The file descriptor can't be invalidated either, the file may be split in
multiple buckets and setting aside one shouldn't invalidate the others.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893204 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
by the file descriptor, filesystem or underlying device.
See, e.g.: https://github.com/vim/vim/pull/4025
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883340 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Coverity warnings from ignored lseek() return value in ->buffered
handling.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878343 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_os_file_put() adds no cleanup so it forces APR_FOPEN_NOCLEANUP, but when
apr_file_mktemp() adds the cleanup implicitely (unless the user specifies
APR_FOPEN_NOCLEANUP explicitely), it needs to clear APR_FOPEN_NOCLEANUP for
the resulting file.
Note: Without this fix, a file created with apr_file_mktemp() and later
passed to apr_file_setaside(), or within a file bucket passed to
apr_bucket_setaside(), will leak both the fd and inode because
the cleanup gets dropped (e.g. httpd's BZ 64452).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878279 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
msgid: <CABw-3YcK0qbeYWDOwE684XtBj3rCT2CuVOBWWqda4gMtRyRJEw@mail.gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866019 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to read a directory with constant memory consumption:
* include/apr_file_info.h: Add warning on memory consumption for
apr_dir_read; declare apr_dir_pread.
* file_io/unix/dir.c (apr_dir_pread): Rename from apr_dir_read and
take pool argument. (apr_dir_read): Reimplement using it.
* file_io/win32/dir.c, file_io/os2/dir.c: Likewise, but untested.
* test/testdir.c (test_pread) [APR_POOL_DEBUG]: Add test case.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862071 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
of which_dup to help static analysers.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862068 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1861263 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a simpler path of avoiding dirread_r always, by default. This saves us
various additional detection logic, and follows advice of library maintainers
and our library's behavior, any apparent "thread safety" offered by the _r()
flavors of this function were not truly supported by APR's allocation or
dirread_r reentrancy of parallel threads attemping to access the same open
directory descriptor.
Retains r1856192, r1856196 to avoid wasteful allocation in the dirread() case.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856755 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856196 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856192 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On platforms where readdir_r() is available but deprecated, readdir() is to
be used although it's not in libc_r (e.g. Linux has no libc_r).
In this case we can APR_TRY_COMPILE_NO_WARNING readdir_r() and, if it's
deprecated, define READDIR_IS_THREAD_SAFE.
With this we don't need user-defined APR_USE_READDIR{,64}_R from r1789258.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856189 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
don't copy bogus pointer after apr_filepath_get() error return.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856030 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
file_pipe_create(), to avoid duplicated code.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1809757 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1791029 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Use the platform-specific fcntl(fd, F_FULLFSYNC) instead.
See http://apr.markmail.org/thread/hlgqd5yr6j4auxol
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790200 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
and readdir_r() is defective and deprecated, use the former by default unless
APR_USE_READDIR_R is defined (no use case currently hence not autoconfigured).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1789258 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The Win32 implementation incorrectly flushes the buffered writes _after_
truncating a file. Such files will have unexpected data written after
the position at which they should've been truncated. PR 51017.
(Under Unix, this issue has been fixed in r1044440)
- Both Win32 and Unix implementations incorrectly keep the data read into
a buffer after the file is truncated. Thus, reading from a file after
apr_file_trunc() can return invalid data from the previous file offset.
* file_io/win32/seek.c
(apr_file_trunc): Flush the write buffer or discard the read buffer
before truncating. Propely update the internal file offset (filePtr)
and the eof_hit marker.
* file_io/unix/seek.c
(apr_file_trunc): Discard the read buffer before truncating.
* test/testfile.c
(test_file_trunc): Extend the checks. Factor out part of this test...
(test_file_trunc_buffered_write): ...into this new test.
(test_file_trunc_buffered_write2, test_file_trunc_buffered_read): New tests.
(testfile): Run the new tests.
Patch by: Evgeny Kotkov <evgeny.kotkov {at} visualsvn.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1788929 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
pipes to be created, each in a different pool.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1734816 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
apr_file_lock() should lock the whole file. The code uses SEEK_SET which
means 'start of file' and is correct, but the comments describe the SEEK_CUR
behavior.
Fix comments.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1696767 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* file_io/unix/mktemp.c (apr_file_mktemp): Use glibc mkostemp or
mkostemp64 where available to set FD_CLOEXEC without the extra
system calls.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1683520 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Introduce non-exported sys/attr.h autoconf flag for OS/X
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1567722 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1559343 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
that uses it; return APR_ENOTIMPL instead of ignoring it if
not supported.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1538171 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
to the mutex field, since the conditions under which we
got the mutex vs. accessed it were different; simplify
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1534873 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: 48557
Submitted by: Mike Frysinger <vapier gentoo org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1183698 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
PR: 51254
Submitted by: William Lee <william lee rainstor com>,
Wim Lewis <wiml omnigroup com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1183688 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
HAVE_STRUCT_STAT_ST_MTIME_N / HAVE_STRUCT_STAT_ST_ATIME_N is defined.
PR: 51146
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1099348 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: 47776
Submitted by: Boya Sun <boya.sun case.edu>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1089438 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Submitted by: Carlo Bramini <carlo.bramix libero.it>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1087027 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1086695 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1073142 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1044447 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
before truncate call
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1044440 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
- error handling issues
- use of uninitialized data
- null pointer dereference
- unused variables
- memory/fd leaks
- broken code in threadproc/beos/proc.c
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@979891 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
apr_socket_wait() and apr_file_pipe_wait().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@933338 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@931553 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
>HUGE_STRING_LEN test in testfile.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930676 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
pipe in non blocking module through the APR_FOPEN_NONBLOCK flag.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@917819 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
within the file_io code.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@917675 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@906390 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- When opened with normal rotating flag, every 60 seconds the file will check
if the file it is writing to has changed inode (ie, been replaced/moved).
- When opened with the manual rotating flag, the consumer must call the check,
but can provider the current timestamp, to avoid a apr_time call.
This is based off of the patch from Brian, but I've modified it for style, and
adding the manual rotation flag after discussion with brian at the httpd
hackathon.
Submitted by: Brian J. France <brian brianfrance.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@905970 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
already set via O_CLOEXEC.
PR: 46297
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@905040 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@892134 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have just as well been an include/arch/unix/apr_arch_common.h but
is entirely unnecessary.
The right solution is dozens of lines less code and confusion,
simply drive apr_filepath_list_split|merge from filepath_util.c
brought in from the unix/ directory, across all platforms.
One 'temporary' cast was in use by apr_pools.c, the other was
entirely unused.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@892127 13f79535-47bb-0310-9956-ffa450edef68
|