On Wed, 2008-05-28 at 14:12 +1000, Bojan Smojver wrote:
> Maybe shm_cleanup_onwer() should check (line 73 of shmem/unix/shm.c) to
> see if the the file has already been removed and return APR_SUCCESS if
> it was, instead of always calling apr_file_remove()?
Something like this (possibly required in other places too).
--
Bojan
Index: shmem/unix/shm.c
===================================================================
--- shmem/unix/shm.c (revision 660112)
+++ shmem/unix/shm.c (working copy)
@@ -70,7 +70,12 @@
if (shmdt(m->base) == -1) {
return errno;
}
- return apr_file_remove(m->filename, m->pool);
+ if (access(m->filename, F_OK)) {
+ return APR_SUCCESS;
+ }
+ else {
+ return apr_file_remove(m->filename, m->pool);
+ }
#endif
}