From: Thayne Harbaugh <thayne@c2.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [BUG][PATCH] nanosleep doesn't write remaining time
Date: Wed, 12 Dec 2007 22:12:43 -0700 [thread overview]
Message-ID: <1197522763.3640.11.camel@phantasm.home.enterpriseandprosperity.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
nanosleep() doesn't write remaining time if there's an error - but it's
when return value == -1 and errno == EINTR when the remaining time must
be written.
[-- Attachment #2: 11_nanosleep_rem.patch --]
[-- Type: text/x-patch, Size: 594 bytes --]
Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c 2007-12-12 22:01:13.000000000 -0700
+++ qemu/linux-user/syscall.c 2007-12-12 22:08:49.000000000 -0700
@@ -5134,7 +5134,7 @@
if (copy_from_user_timespec(&req, arg1))
goto efault;
ret = get_errno(nanosleep(&req, &rem));
- if (!is_error(ret) && arg2) {
+ if (ret == -TARGET_EINTR && arg2) {
if (copy_to_user_timespec(arg2, &rem))
goto efault;
}
reply other threads:[~2007-12-13 5:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1197522763.3640.11.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).