qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null",


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
Date: Mon, 28 Jan 2019 16:05:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/28/19 12:03 PM, Paolo Bonzini wrote:
> On 28/01/19 10:47, Alex Bennée wrote:
>>>
>>> [1] The fix seems https://github.com/openbsd/src/commit/c2a35b387f9d3c
>>>   "fcntl(F_SETFL) invokes the FIONBIO and FIOASYNC ioctls internally, so
>>>   the memory devices (/dev/null, /dev/zero, etc) need to permit them."
>> I assume set_nonblock is called on more than just these special devices?
>> Is there anyway to check this on OpenBSD or is it just an anonymous fd
>> at this point?
>>
> 
> Perhaps on OpenBSD we should just assert that we don't get EBADF?

We get ENODEV for "not a memory device":

    19 ENODEV Operation not supported by device.
    An attempt was made to apply an inappropriate function to a device,
    for example, trying to read a write-only device such as a printer.

I'll respin with your suggestion.

Thanks!

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]