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


Reply via email to