Re: [libvirt] [PATCH] Close logfile fd after spawning qemu

2009-09-10 Thread Daniel Veillard
On Thu, Sep 10, 2009 at 02:13:56PM +0900, Ryota Ozaki wrote: Hi, This patch closes logfile fd after spawing qemu in qemudStartVMDaemon. The fd seems to be closed in the error path, but not in the normal path. The fd is passed to virExecDaemonize though, but looks not being closed inside it.

Re: [libvirt] [PATCH] Close logfile fd after spawning qemu

2009-09-10 Thread Mark McLoughlin
On Thu, 2009-09-10 at 11:04 +0200, Daniel Veillard wrote: On Thu, Sep 10, 2009 at 02:13:56PM +0900, Ryota Ozaki wrote: Hi, This patch closes logfile fd after spawing qemu in qemudStartVMDaemon. The fd seems to be closed in the error path, but not in the normal path. The fd is passed to

Re: [libvirt] [PATCH] Close logfile fd after spawning qemu

2009-09-10 Thread Ryota Ozaki
On Thu, Sep 10, 2009 at 6:04 PM, Daniel Veillardveill...@redhat.com wrote:  Hum, it's not quite simple. It's passed down to __virExec() where it is provided as the stdout/stderr to use, it's not closed there on the parent though. I guess it's safe to close it at that point at the end of

Re: [libvirt] [PATCH] Close logfile fd after spawning qemu

2009-09-10 Thread Daniel Veillard
On Thu, Sep 10, 2009 at 10:15:58AM +0100, Mark McLoughlin wrote: On Thu, 2009-09-10 at 11:04 +0200, Daniel Veillard wrote: On Thu, Sep 10, 2009 at 02:13:56PM +0900, Ryota Ozaki wrote: Hi, This patch closes logfile fd after spawing qemu in qemudStartVMDaemon. The fd seems to be

Re: [libvirt] [PATCH] Close logfile fd after spawning qemu

2009-09-10 Thread Ryota Ozaki
On Thu, Sep 10, 2009 at 6:35 PM, Daniel Veillardveill...@redhat.com wrote: On Thu, Sep 10, 2009 at 10:15:58AM +0100, Mark McLoughlin wrote: On Thu, 2009-09-10 at 11:04 +0200, Daniel Veillard wrote: On Thu, Sep 10, 2009 at 02:13:56PM +0900, Ryota Ozaki wrote: Hi, This patch closes

[libvirt] [PATCH] Close logfile fd after spawning qemu

2009-09-09 Thread Ryota Ozaki
Hi, This patch closes logfile fd after spawing qemu in qemudStartVMDaemon. The fd seems to be closed in the error path, but not in the normal path. The fd is passed to virExecDaemonize though, but looks not being closed inside it. Eventually, the fd is never closed during libvirtd lifetime.