INN commit: trunk/storage/buffindexed (shmem.c)
INN Commit
rra at isc.org
Mon Jun 22 18:00:00 UTC 2015
Date: Monday, June 22, 2015 @ 11:00:00
Author: iulius
Revision: 9906
Take into account union semun when dealing with semaphores
Improve commit [9902]. Thanks to The Doctor for the patch.
Modified:
trunk/storage/buffindexed/shmem.c
---------+
shmem.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Modified: shmem.c
===================================================================
--- shmem.c 2015-06-20 20:51:22 UTC (rev 9905)
+++ shmem.c 2015-06-22 18:00:00 UTC (rev 9906)
@@ -265,9 +265,19 @@
else
debug("shmid %d deleted", this->shmid);
/* Delete the semaphore too */
+#ifdef HAVE_UNION_SEMUN
+ {
+ union semun semArg;
+ semArg.val = 0;
+ if (semctl(this->semap, 0, IPC_RMID, semArg) < 0) {
+ syswarn("can't remove semaphore %d", this->semap);
+ }
+ }
+#else
if (semctl(this->semap, 0, IPC_RMID, NULL) < 0) {
syswarn("can't remove semaphore %d", this->semap);
}
+#endif
}
free( this );
}
More information about the inn-committers
mailing list