aboutsummaryrefslogtreecommitdiff
path: root/src/include/port/linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/port/linux.h')
-rw-r--r--src/include/port/linux.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/include/port/linux.h b/src/include/port/linux.h
index 05cba063a91..c0dab3ea21b 100644
--- a/src/include/port/linux.h
+++ b/src/include/port/linux.h
@@ -1 +1,14 @@
-/* $PostgreSQL: pgsql/src/include/port/linux.h,v 1.42 2006/10/04 00:30:09 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/linux.h,v 1.43 2007/07/02 20:11:55 tgl Exp $ */
+
+/*
+ * As of July 2007, all known versions of the Linux kernel will sometimes
+ * return EIDRM for a shmctl() operation when EINVAL is correct (it happens
+ * when the low-order 15 bits of the supplied shm ID match the slot number
+ * assigned to a newer shmem segment). We deal with this by assuming that
+ * EIDRM means EINVAL in PGSharedMemoryIsInUse(). This is reasonably safe
+ * since in fact Linux has no excuse for ever returning EIDRM; it doesn't
+ * track removed segments in a way that would allow distinguishing them from
+ * private ones. But someday that code might get upgraded, and we'd have
+ * to have a kernel version test here.
+ */
+#define HAVE_LINUX_EIDRM_BUG