about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog4
-rw-r--r--nptl/sem_unlink.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 501791c661..9e3717da69 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-20  Jakub Jelinek  <jakub@redhat.com>
+
+	* sem_unlink.c (sem_unlink): Change EPERM into EACCES.
+
 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
 	* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
diff --git a/nptl/sem_unlink.c b/nptl/sem_unlink.c
index 92288df8be..17074774db 100644
--- a/nptl/sem_unlink.c
+++ b/nptl/sem_unlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -60,5 +60,8 @@ sem_unlink (name)
 	     name, namelen + 1);
 
   /* Now try removing it.  */
-  return unlink (fname);
+  int ret = unlink (fname);
+  if (ret < 0 && errno == EPERM)
+    __set_errno (EACCES);
+  return ret;
 }