OSDN Git Service

2003-06-27 Jose Goncalves <jose.goncalves@inov.pt>
authorjjohnstn <jjohnstn>
Fri, 27 Jun 2003 21:25:18 +0000 (21:25 +0000)
committerjjohnstn <jjohnstn>
Fri, 27 Jun 2003 21:25:18 +0000 (21:25 +0000)
        * libc/sys/linux/mq_open.c (mq_open): Only set created flag
        on if we actually created the shared memory file exclusively.

newlib/ChangeLog
newlib/libc/sys/linux/mq_open.c

index d5896f0..350b869 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-27  Jose Goncalves  <jose.goncalves@inov.pt>
+
+       * libc/sys/linux/mq_open.c (mq_open): Only set created flag
+       on if we actually created the shared memory file exclusively.
+
 2003-06-27  Joe Vornehm  <joev@mitre.org>
 
        * libm/common/s_fpclassify.c (__fpclassifyf): Fix
index 0e6b953..9b72e90 100644 (file)
@@ -98,7 +98,9 @@ mq_open (const char *name, int oflag, ...)
          return (mqd_t)-1;
        }
       errno = saved_errno;
-      created = 1;
+      /* check if we created the file or not */
+      if (fd >= 0)
+        created = 1;
     }
          
   if (fd < 0)