--- mm_core.c 2003/03/07 14:59:15 1.20
+++ mm_core.c 2003/03/07 15:04:50 1.21
@@ -271,10 +271,6 @@
#if defined(MM_SHMT_MMZERO)
if ((fdmem = open("/dev/zero", O_RDWR, MM_CORE_FILEMODE)) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to open /dev/zero");
-#if defined(F_SETFD) && defined(FD_CLOEXEC)
- if (fcntl(fdmem, F_SETFD, FD_CLOEXEC) == -1)
- FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to set close-on-exec flag");
-#endif
if (lseek(fdmem, mm_core_mapoffset+size, SEEK_SET) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to seek in /dev/zero");
write(fdmem, &zero, sizeof(zero));
@@ -289,10 +285,6 @@
unlink(fnmem);
if ((fdmem = open(fnmem, O_RDWR|O_CREAT|O_EXCL, MM_CORE_FILEMODE)) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to open memory file");
-#if defined(F_SETFD) && defined(FD_CLOEXEC)
- if (fcntl(fdmem, F_SETFD, FD_CLOEXEC) == -1)
- FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to set close-on-exec flag");
-#endif
if (ftruncate(fdmem, mm_core_mapoffset+size) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to truncate memory file");
write(fdmem, &zero, sizeof(zero));
|