* [PATCH] EPERM -> EACCES for s[eh]m_unlink as well
@ 2004-04-20 17:45 Jakub Jelinek
2004-04-20 18:59 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2004-04-20 17:45 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
2004-04-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into
EACCES.
nptl/
* sem_unlink.c (sem_unlink): Change EPERM into EACCES.
--- libc/sysdeps/unix/sysv/linux/shm_open.c.jj 2003-08-26 23:07:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/shm_open.c 2004-04-20 19:30:09.260363887 +0200
@@ -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;
}
--- libc/nptl/sem_unlink.c.jj 2002-12-08 09:17:18.000000000 +0100
+++ libc/nptl/sem_unlink.c 2004-04-20 19:28:07.000000000 +0200
@@ -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;
}
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] EPERM -> EACCES for s[eh]m_unlink as well
2004-04-20 17:45 [PATCH] EPERM -> EACCES for s[eh]m_unlink as well Jakub Jelinek
@ 2004-04-20 18:59 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-04-20 18:59 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
Applied.
--
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-20 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20 17:45 [PATCH] EPERM -> EACCES for s[eh]m_unlink as well Jakub Jelinek
2004-04-20 18:59 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).