aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2003-06-27 21:25:19 +0000
committerJeff Johnston <jjohnstn@redhat.com>2003-06-27 21:25:19 +0000
commit07b40cf84923562b3b7f86d6f2c69ba6d132655b (patch)
tree53f47d861154533eafeba993b653c5a0f7147d76
parent7daa789107361022a40d7163829d92a49e757477 (diff)
downloadnewlib-07b40cf84923562b3b7f86d6f2c69ba6d132655b.zip
newlib-07b40cf84923562b3b7f86d6f2c69ba6d132655b.tar.gz
newlib-07b40cf84923562b3b7f86d6f2c69ba6d132655b.tar.bz2
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.
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/sys/linux/mq_open.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index d5896f0..350b869 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -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
diff --git a/newlib/libc/sys/linux/mq_open.c b/newlib/libc/sys/linux/mq_open.c
index 0e6b953..9b72e90 100644
--- a/newlib/libc/sys/linux/mq_open.c
+++ b/newlib/libc/sys/linux/mq_open.c
@@ -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)