Update.
[platform/upstream/glibc.git] / sysdeps / unix / sysv / linux / shm_open.c
index 73804f5..2e94b76 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -227,7 +227,10 @@ shm_unlink (const char *name)
             name, namelen + 1);
 
   /* And remove the file.  */
-  return unlink (fname);
+  int ret = unlink (fname);
+  if (ret < 0 && errno == EPERM)
+    __set_errno (EACCES);
+  return ret;
 }