[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/4] Clear handler only for valid fd
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/4] Clear handler only for valid fd |
Date: |
Mon, 24 Sep 2012 13:34:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> Il 24/09/2012 11:58, Orit Wasserman ha scritto:
>>>> >> if (s->fd != -1) {
>>>> >> + qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
>>>> >> close(s->fd);
>>>> >> s->fd = -1;
>>>> >> }
>>> >
>>> > As far as I can see, qemu_set_fd_handler2() treats invalid file
>>> > descriptor -1 just like any other. If it's in io_handlers, it gets
>>> > deleted, else it's a nop. Thus, the old code works.
>> Not any more, there was an assert(fd >=0) added in commit
>> bbdd2ad0814ea0911076419ea21b7957505cf1cc
>> recently.
>>
>>> > I'm not sufficiently familiar with the migration code to judge whether
>>> > moving the handler reset down is safe.
>>> >
>> I can keep the call in the same location if you think it is safer.
I have no idea, and...
> I think it's okay as you did, given how the code looks like now.
... I'm prepared to take Paolo's word for it.
[...]
- Re: [Qemu-devel] [PATCH v4 2/4] Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect, (continued)
Re: [Qemu-devel] [PATCH v4 0/4] nonblocking connect address handling cleanup, Michael S. Tsirkin, 2012/09/23
Re: [Qemu-devel] [PATCH v4 0/4] nonblocking connect address handling cleanup, Markus Armbruster, 2012/09/24