From: Thayne Harbaugh <thayne@c2.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] getpriority() shouldn't use libc wrapper
Date: Mon, 01 Oct 2007 23:30:21 -0600 [thread overview]
Message-ID: <1191303021.5200.36.camel@phantasm.home.enterpriseandprosperity.com> (raw)
In-Reply-To: <1190837168.13060.10.camel@phantasm.home.enterpriseandprosperity.com>
On Wed, 2007-09-26 at 14:06 -0600, Thayne Harbaugh wrote:
> The linux-user getpriority() syscall goes through the libc wrapper.
> This causes a problem because the libc wrapper remaps the return value
> from the kernel. This patch calls the kernel getpriority syscall
> directly.
I didn't see any discussion about this nor did I see it committed. Were
there any concerns or objections? It fixes several failures in the LTP
test suite.
The bug is that the kernel returns -1 on error and 1-40 on success - the
libc wrapper remaps this to -1 or error and -20 - 19 on succes (errno
must be cleared and checked for the -1 case to determine if there was an
error). If qemu uses the libc wrapper then the return value is aleady
remapped to negative numbers - which appear to be errors.
prev parent reply other threads:[~2007-10-02 5:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 20:06 [Qemu-devel] [PATCH] getpriority() shouldn't use libc wrapper Thayne Harbaugh
2007-10-02 5:30 ` Thayne Harbaugh [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=1191303021.5200.36.camel@phantasm.home.enterpriseandprosperity.com \
--to=thayne@c2.net \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).