From: Anton Arapov <aarapov@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: Re: SysV IPC: shmctl/msgctl/semctl returns EIDRM instead of EINVAL
Date: Sun, 05 Aug 2007 23:37:15 +0200 [thread overview]
Message-ID: <m38x8pr7ck.fsf@neuro-laptop.skynet> (raw)
In-Reply-To: <m3bqdo1otl.fsf@neuro-laptop.skynet> (Anton Arapov's message of "Fri\, 03 Aug 2007 19\:59\:50 +0200")
Please, fellas, take a look on my post!
Thanks in advance.
Anton Arapov <aarapov@redhat.com> writes:
> Hi!
>
> SysV code returns EIDRM for collision of IDs. I sure it should return EINVAL.
>
> Steps to reproduce: (this for shared memory code, for msg/sem it is the same)
> 1. Create then drop 2 shmem segments, then create a third.
> 2. Try to shmctl(IPC_STAT) the two now-invalid shm IDs.
> 3. Note error codes returned.
>
> One call gives EINVAL, one gives EIDRM due to collision with the third shmem segment.
> Should both give EINVAL, this is what I've got on every other Unix I've tried it on.
>
> IPC code is good, EIDRM is justification of EINVAL. But neither SVr4 nor SVID documents EIDRM.
> Single Unix Specification mentions EINVAL but not EIDRM as a possible failure for shmctl(), so the current kernel behavior is not merely self-inconsistent but a flat violation of the spec.
>
> Can somebody explain why do we have EIDRM?
>
> Anton.
> SUS: http://www.opengroup.org/onlinepubs/007908799/xsh/shmctl.html
prev parent reply other threads:[~2007-08-05 21:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 17:59 Anton Arapov
2007-08-05 21:37 ` Anton Arapov [this message]
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=m38x8pr7ck.fsf@neuro-laptop.skynet \
--to=aarapov@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®