You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ni...@apache.org on 2008/06/01 02:50:23 UTC
svn commit: r662114 - /apr/apr/trunk/shmem/unix/shm.c
Author: niq
Date: Sat May 31 17:50:23 2008
New Revision: 662114
URL: http://svn.apache.org/viewvc?rev=662114&view=rev
Log:
apr_shm: fix failure in test_named_remove
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.
Modified:
apr/apr/trunk/shmem/unix/shm.c
Modified: apr/apr/trunk/shmem/unix/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/shmem/unix/shm.c?rev=662114&r1=662113&r2=662114&view=diff
==============================================================================
--- apr/apr/trunk/shmem/unix/shm.c (original)
+++ apr/apr/trunk/shmem/unix/shm.c Sat May 31 17:50:23 2008
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <unistd.h>
#include "apr_arch_shm.h"
#include "apr_general.h"
@@ -69,7 +70,7 @@
/* Indicate that the segment is to be destroyed as soon
* as all processes have detached. This also disallows any
* new attachments to the segment. */
- if (shmctl(m->shmid, IPC_RMID, NULL) == -1) {
+ if (shmctl(m->shmid, IPC_RMID, NULL) == -1 && errno != EINVAL) {
return errno;
}
if (shmdt(m->base) == -1) {
Re: svn commit: r662114 - /apr/apr/trunk/shmem/unix/shm.c
Posted by Bojan Smojver <bo...@rexursive.com>.
On Sun, 2008-06-01 at 01:38 +0000, Nick Kew wrote:
> Probably. But I hadn't seen that when I applied the patch shown to 1.3.
Sorry, I should have pointed here:
http://svn.apache.org/viewvc?view=rev&revision=661146
> And I'm not testing now: it's 2:39 a.m. here!
No kidding :-)
--
Bojan
Re: svn commit: r662114 - /apr/apr/trunk/shmem/unix/shm.c
Posted by Nick Kew <ni...@apache.org>.
On Sun, 1 Jun 2008, Bojan Smojver wrote:
> On Sun, 2008-06-01 at 00:50 +0000, niq@apache.org wrote:
>
>> Supplementary to r661146:
>> - Include the necessary unistd.h
>
> Doesn't this do it for you?
>
> http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_shm.h?r1=428317&r2=661146
Probably. But I hadn't seen that when I applied the patch shown to 1.3.
And I'm not testing now: it's 2:39 a.m. here!
Hence my comment about syncing with other trunk updates in my last
message.
--
Nick Kew
Re: svn commit: r662114 - /apr/apr/trunk/shmem/unix/shm.c
Posted by Bojan Smojver <bo...@rexursive.com>.
On Sun, 2008-06-01 at 00:50 +0000, niq@apache.org wrote:
> Supplementary to r661146:
> - Include the necessary unistd.h
Doesn't this do it for you?
http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_shm.h?r1=428317&r2=661146
--
Bojan