From 07b40cf84923562b3b7f86d6f2c69ba6d132655b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 27 Jun 2003 21:25:19 +0000 Subject: 2003-06-27 Jose Goncalves * libc/sys/linux/mq_open.c (mq_open): Only set created flag on if we actually created the shared memory file exclusively. --- newlib/libc/sys/linux/mq_open.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'newlib/libc/sys/linux/mq_open.c') diff --git a/newlib/libc/sys/linux/mq_open.c b/newlib/libc/sys/linux/mq_open.c index 0e6b95345..9b72e9073 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) -- cgit v1.2.3