[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] net: Make -netdev socket,listen= work
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] net: Make -netdev socket,listen= work |
Date: |
Tue, 31 Jul 2012 16:20:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
Il 31/07/2012 15:04, Stefan Hajnoczi ha scritto:
>> > Looks good to me. A minor nit: 2/2 keeps the close(s->fd) call (instead
>> > of calling closesocket(s->fd), like in eoc handling) in
>> > net_socket_cleanup().
> The reason I didn't change close(2) to closesocket() is because
> -netdev socket,fd= can pass arbitrary file descriptors. I suspect
> only real socket objects will work but we basically don't know what
> the passed file descriptor is. This is the reason why I didn't feel
> 100% happy converting it to closesocket().
>
-netdev socket,fd= is probably not usable from Windows, so no problem
using close().
Paolo