summaryrefslogtreecommitdiff
path: root/shmem
Commit message (Collapse)AuthorAgeFilesLines
* * shmem/unix/shm.c (apr_shm_open):Joe Orton2023-01-231-14/+11
| | | | | | | | | | | | Use ftruncate() directly for the shm_open() path avoiding unnecessary complexity - and lseek() - of using apr_file_t wrapper. Also catch mmap() errors. PR: 66435 Github: closes #38 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1906947 13f79535-47bb-0310-9956-ffa450edef68
* Remove trailing whitespaces in *.c.Ivan Zhakov2022-11-204-59/+59
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* Stage 2 in cleaning win95 code ... cleanup filesysMladen Turk2021-12-021-27/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895510 13f79535-47bb-0310-9956-ffa450edef68
* Stage 3 in dismantling _WIN32_WCE ... cleanup codeMladen Turk2021-12-021-26/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895508 13f79535-47bb-0310-9956-ffa450edef68
* win32: Fix handle leak apr_shm_create() implementation.Ivan Zhakov2019-05-151-2/+6
| | | | | | | | | * shmem/win32/shm.c (can_create_global_maps): Close thread/process token after checking for privilege. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859270 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_shm_delete()Jim Jagielski2014-04-284-0/+35
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1590624 13f79535-47bb-0310-9956-ffa450edef68
* Ahh... found a testcase which req's this.Jim Jagielski2014-01-261-2/+1
| | | | | | | FIX data corruption git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561555 13f79535-47bb-0310-9956-ffa450edef68
* Okey dokey... how we gen the key isn't part of our ABI,Jim Jagielski2014-01-251-3/+14
| | | | | | | so we can fix it without breaking it. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561394 13f79535-47bb-0310-9956-ffa450edef68
* FIXME commentJim Jagielski2014-01-251-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561384 13f79535-47bb-0310-9956-ffa450edef68
* Get working on OSX and others.Jim Jagielski2014-01-251-2/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561356 13f79535-47bb-0310-9956-ffa450edef68
* Revert mistaken c/pJim Jagielski2014-01-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561347 13f79535-47bb-0310-9956-ffa450edef68
* Because of Darwin/OSX, we need to worry aboutJim Jagielski2014-01-251-33/+22
| | | | | | | | | the pathlength, which is much less than 255. So use the method from posix sems, which we've used for years! git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561265 13f79535-47bb-0310-9956-ffa450edef68
* *) Fix POSIX shared memory (shm_open) use for named shared memory.Jim Jagielski2014-01-251-6/+82
| | | | | | | PR 55928. [Jozef Hatala <jh-asf skrt org>] git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561260 13f79535-47bb-0310-9956-ffa450edef68
* Not now... revertJim Jagielski2014-01-241-12/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561209 13f79535-47bb-0310-9956-ffa450edef68
* stop using deprecated versions of APR_FOPEN_* and APR_FPROT_*Jeff Trawick2014-01-182-15/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1559343 13f79535-47bb-0310-9956-ffa450edef68
* Close https://issues.apache.org/bugzilla/show_bug.cgi?id=53996Jim Jagielski2013-11-171-3/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1542728 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1531768:Jeff Trawick2013-10-204-15/+105
| | | | | | | | | Add apr_shm_create_ex() and apr_shm_attach_ex(), which provide the ability to select the Global or Local namespace on Windows. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1533979 13f79535-47bb-0310-9956-ffa450edef68
* Windows: Create named shared memory segments under the "Local" Jeff Trawick2013-10-131-15/+99
| | | | | | | | | namespace if the caller is unprivileged, fixing an inability of unprivileged callers to use apr_shm_create() with named shared memory segments under recent Windows. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1531768 13f79535-47bb-0310-9956-ffa450edef68
* Use _WIN64 instead of WIN64 (compiler define vs. SDK define)Jeff Trawick2012-03-011-1/+1
| | | | | | | | | | | in .c/.h. WIN64 wasn't defined, resulting in crashes in httpd. PR: 49155 Submitted by: <anindyabaruah gmail.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1295535 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Remove all remaining uses of APR_OS2_STATUS macro which has beenBrian Havard2010-04-021-1/+1
| | | | | | | superceded by the more general APR_FROM_OS_ERROR. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930224 13f79535-47bb-0310-9956-ffa450edef68
* Use the APR_FOPEN_* constants instead of the deprecated APR_* constantsGraham Leggett2010-03-021-3/+3
| | | | | | | within code outside the file_io code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@917837 13f79535-47bb-0310-9956-ffa450edef68
* Make sure we don't leak file descriptors.Jean-Frederic Clere2010-02-161-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@910597 13f79535-47bb-0310-9956-ffa450edef68
* changed conditionals to avoid a couple of 'statement not reached'Guenter Knauf2009-09-291-32/+23
| | | | | | | warnings with strict compilers. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@819897 13f79535-47bb-0310-9956-ffa450edef68
* Add missing proto for apr_unix_perms2modeMladen Turk2009-02-071-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@741869 13f79535-47bb-0310-9956-ffa450edef68
* Add object perms set macros and implement them for shm and mutexMladen Turk2009-02-074-10/+36
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@741862 13f79535-47bb-0310-9956-ffa450edef68
* Header unistd.h is already included in arch/unix/apr_arch_shm.h.Bojan Smojver2008-06-021-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@662300 13f79535-47bb-0310-9956-ffa450edef68
* apr_shm: fix failure in test_named_removeNick Kew2008-06-011-1/+2
| | | | | | | | | | | Supplementary to r661146: - Include the necessary unistd.h - Ignore EINVAL from shmctl in shm_cleanup_owner This fixes the testcase, but doesn't feel like the end of the story: both this and r661146 feel like sticking plaster over something deeper. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@662114 13f79535-47bb-0310-9956-ffa450edef68
* If the named resource was removed by apr_shm_remove(), it may not be there.Bojan Smojver2008-05-281-2/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@661146 13f79535-47bb-0310-9956-ffa450edef68
* Remove shm backed file on cleanup/remove for creatorMladen Turk2008-05-201-4/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@658105 13f79535-47bb-0310-9956-ffa450edef68
* Trivial implementation of shm_remove for win32. If we have a backing file ↵Mladen Turk2008-05-181-1/+1
| | | | | | try to remove it instead returning APR_ENOTIMPL. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@657500 13f79535-47bb-0310-9956-ffa450edef68
* The calls to UnmapViewOfFile() and CloseHandle() in the shm_cleanup()Davi Arnaut2007-10-121-2/+2
| | | | | | | | | | | | routine in the win32/shm.c source are not properly checking for errors. They currently assume a non-zero return is an error.Whereas these windows calls return non-zero on success and zero on failure. PR: 43065 Submitted by: Joe Mudd git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584331 13f79535-47bb-0310-9956-ffa450edef68
* apr_status_t code, not Win32 error code.William A. Rowe Jr2007-08-281-1/+1
| | | | | | | PR: 43178 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@570289 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-034-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-034-24/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Fatal compiler quirk, you would think (DWORD)(n >> 32) == 0 William A. Rowe Jr2005-06-181-5/+8
| | | | | | | if n is a DWORD. But, alas, in release builds it doesn't. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@191306 13f79535-47bb-0310-9956-ffa450edef68
* An internal flaw - Win64 requires hi/lo buffer size argsWilliam A. Rowe Jr2005-05-161-2/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@170456 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-044-4/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Remove .cvsignore files.Joe Orton2004-11-183-12/+0
| | | | | | | Tipped-of-by: Uwe Zeisberger git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
* * shmem/unix/shm.c (apr_shm_remove): Ensure that the file is removedJoe Orton2004-09-211-3/+11
| | | | | | | | even if the shm segment has already been destroyed; close the file before returning. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65337 13f79535-47bb-0310-9956-ffa450edef68
* Continue clearing my TODO list.David Reid2004-06-291-7/+21
| | | | | | | | This provides for better "naming" of anon areas, adds a missing function and tidies up some code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65236 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_shm.c (apr_shm_remove): Add prototype.Joe Orton2004-06-014-0/+68
| | | | | | | | | | | | * shmem/unix/shm.c (apr_shm_remove): New function. * shmem/beos/shm.c, shmem/win32/shm.c, shmem/os2/shm.c (apr_shm_remove): APR_ENOTIMPL stubs. Submitted by: Amit Athavale <amit_athavale@persistent.co.in> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65143 13f79535-47bb-0310-9956-ffa450edef68
* * shmem/unix/shm.c (apr_shm_create): Answer some FIXMEs: wrong, yes, no.Joe Orton2004-05-271-4/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65135 13f79535-47bb-0310-9956-ffa450edef68
* * shmem/unix/shm.c (apr_shm_attach): Remove palloc->ENOMEM checking.Joe Orton2004-05-271-15/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65134 13f79535-47bb-0310-9956-ffa450edef68
* * shmem/unix/shm.c (shm_cleanup_owner): Simplify error handling.Joe Orton2004-05-271-14/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65133 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-134-196/+40
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* First whack at switching to a single top-level make. This adds a dependencyGreg Stein2004-02-053-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon Python at packaging time, but not at end-user config/build time. As far as I can tell, the build continues to function properly. (out-of-dir config/make not tested, and apr-iconv prolly needs some work) The buildconf scripts now generate a build-outputs.mk file which is included by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk specifies all of the various files present in the distribution. The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports. The corresponding delete-* targets were eliminated since we have a precise set of inputs. The subdirs' Makefiles were removed since they are no longer called/used. The apr-util/uri Makefile was responsible for compiling a C program to generate the uri_delims.h file. That process was replaced by a Python script to generate the header (called by buildconf). The .c and .dsp were left for the Windows build to continue, but that should be revamped. build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of cleanup is still needed. Much of the recursive/local/x- logic is no longer needed and can be elimianated. rules.mk was created for inclusion by N makefiles, but that isn't really true any more, so it could probably be tossed (caveat: test/Makefile). Saved for a phase 2. Some additional work was added to properly clean up files in */build/, rather than relying on a makefile in there. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
* * shmem/unix/shm.c (apr_shm_create): Fix build with Tru64 "cc -std";Joe Orton2003-11-051-2/+2
| | | | | | | cast MAP_FAILED to (void *). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64723 13f79535-47bb-0310-9956-ffa450edef68
* Comment what res_name_from_filename is doingWilliam A. Rowe Jr2003-03-271-0/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64451 13f79535-47bb-0310-9956-ffa450edef68
* rename apr_arch_fileio.h to apr_arch_file_io.h for consistencyThom May2003-01-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64275 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection for include/arch/ header filesThom May2003-01-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aix/dso.h -> -> aix/apr_arch_dso.h beos/dso.h -> beos/apr_arch_dso.h beos/proc_mutex.h -> beos/apr_arch_proc_mutex.h beos/thread_cond.h -> beos/apr_arch_thread_cond.h beos/thread_mutex.h -> beos/apr_arch_thread_mutex.h beos/threadproc.h -> beos/apr_arch_threadproc.h beos/thread_rwlock.h -> beos/apr_arch_thread_rwlock.h netware/dso.h -> -> netware/apr_arch_dso.h netware/fileio.h -> -> netware/apr_arch_fileio.h netware/global_mutex.h -> netware/apr_arch_global_mutex.h netware/internal_time.h -> netware/apr_arch_internal_time.h netware/networkio.h -> netware/apr_arch_networkio.h netware/pre_nw.h -> netware/apr_arch_pre_nw.h netware/proc_mutex.h -> netware/apr_arch_proc_mutex.h netware/thread_cond.h -> netware/apr_arch_thread_cond.h netware/thread_mutex.h -> netware/apr_arch_thread_mutex.h netware/threadproc.h -> netware/apr_arch_threadproc.h netware/thread_rwlock.h -> netware/apr_arch_thread_rwlock.h os2/dso.h -> os2/apr_arch_dso.h os2/fileio.h -> os2/apr_arch_fileio.h os2/networkio.h -> os2/apr_arch_networkio.h os2/os2calls.h -> os2/apr_arch_os2calls.h os2/proc_mutex.h -> os2/apr_arch_proc_mutex.h os2/thread_cond.h -> os2/apr_arch_thread_cond.h os2/thread_mutex.h -> os2/apr_arch_thread_mutex.h os2/threadproc.h -> os2/apr_arch_threadproc.h os2/thread_rwlock.h -> os2/apr_arch_thread_rwlock.h os390/dso.h -> os390/apr_arch_dso.h unix/dso.h -> unix/apr_arch_dso.h unix/fileio.h -> unix/apr_arch_fileio.h unix/global_mutex.h -> unix/apr_arch_global_mutex.h unix/inherit.h -> unix/apr_arch_inherit.h unix/internal_time.h -> unix/apr_arch_internal_time.h unix/misc.h -> unix/apr_arch_misc.h unix/networkio.h -> unix/apr_arch_networkio.h unix/proc_mutex.h -> unix/apr_arch_proc_mutex.h unix/shm.h -> unix/apr_arch_shm.h unix/thread_cond.h -> unix/apr_arch_thread_cond.h unix/thread_mutex.h -> unix/apr_arch_thread_mutex.h unix/threadproc.h -> unix/apr_arch_threadproc.h unix/thread_rwlock.h -> unix/apr_arch_thread_rwlock.h win32/atime.h -> win32/apr_arch_atime.h win32/dso.h -> win32/apr_arch_dso.h win32/fileio.h -> win32/apr_arch_fileio.h win32/inherit.h -> win32/apr_arch_inherit.h win32/misc.h -> win32/apr_arch_misc.h win32/networkio.h -> win32/apr_arch_networkio.h win32/proc_mutex.h -> win32/apr_arch_proc_mutex.h win32/thread_cond.h -> win32/apr_arch_thread_cond.h win32/thread_mutex.h -> win32/apr_arch_thread_mutex.h win32/threadproc.h -> win32/apr_arch_threadproc.h win32/thread_rwlock.h -> win32/apr_arch_thread_rwlock.h win32/utf8.h -> win32/apr_arch_utf8.h git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64271 13f79535-47bb-0310-9956-ffa450edef68