Re: [Qemu-devel] [PATCH 1/5] rng: initialize file descriptor to -1

2013-12-11 Thread Eric Blake
On 12/10/2013 10:00 AM, Paolo Bonzini wrote: > The file descriptor is never initialized to -1, which makes rng-random > close stdin if an object is created and immediately destroyed. If we > change it to -1, we also need to protect qemu_set_fd_handler from > receiving a bogus file descriptor. > >

[Qemu-devel] [PATCH 1/5] rng: initialize file descriptor to -1

2013-12-10 Thread Paolo Bonzini
The file descriptor is never initialized to -1, which makes rng-random close stdin if an object is created and immediately destroyed. If we change it to -1, we also need to protect qemu_set_fd_handler from receiving a bogus file descriptor. Signed-off-by: Paolo Bonzini --- backends/rng-random.c