From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] EPERM -> EACCES for s[eh]m_unlink as well
Date: Tue, 20 Apr 2004 17:45:00 -0000 [thread overview]
Message-ID: <20040420153319.GC5191@sunsite.ms.mff.cuni.cz> (raw)
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
next reply other threads:[~2004-04-20 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 17:45 Jakub Jelinek [this message]
2004-04-20 18:59 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040420153319.GC5191@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).