* [Qemu-devel] [BUG][PATCH] nanosleep doesn't write remaining time
@ 2007-12-13 5:12 Thayne Harbaugh
0 siblings, 0 replies; only message in thread
From: Thayne Harbaugh @ 2007-12-13 5:12 UTC (permalink / raw)
To: qemu-devel
[-- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-13 5:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 5:12 [Qemu-devel] [BUG][PATCH] nanosleep doesn't write remaining time Thayne Harbaugh
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).