From: jjohnstn Date: Fri, 27 Jun 2003 21:25:18 +0000 (+0000) Subject: 2003-06-27 Jose Goncalves X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b6345c2edb53d734564a4379a47e51cbf2b07855;p=pf3gnuchains%2Fpf3gnuchains3x.git 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. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index d5896f0b8e..350b8694bc 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +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. + 2003-06-27 Joe Vornehm * 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 0e6b953450..9b72e9073d 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)