|
From: | Paolo Bonzini |
Subject: | [Qemu-devel] Re: [PATCH] osdep: Fix runtime failure on older Linux kernels |
Date: | Fri, 18 Dec 2009 11:42:36 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Lightning/1.0pre Thunderbird/3.0b4 |
On 12/18/2009 10:45 AM, Andre Przywara wrote:
If QEMU finds newer kernel header files on compilation time, it will use advertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test. If later the executables are executed on an older kernel (<2.6.27, like Xen Dom0 2.6.18), then QEMU will fail on opening sockets and creating pipes and returns the rather unspecific "qemu_init_main_loop failed". This patch fixes this by checking the return values of these calls for EINVAL and ENOSYS and falling back to the older versions automatically.
Agreed, most other apps that use *_CLOEXEC do this (including glibc itself and gnulib; the notable exception is APR and there were quite some flames about this).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |