Re: [libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-26 Thread John Ferlan
On 9/26/18 5:46 AM, Michal Privoznik wrote: > On 09/25/2018 06:25 PM, John Ferlan wrote: >> >> >> On 9/21/18 5:29 AM, Michal Privoznik wrote: >>> If there was a caller which would dup the client FD without >>> CLOEXEC flag and later decided to change the flag it wouldn't be >>> safe to do becaus

Re: [libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-26 Thread Michal Privoznik
On 09/25/2018 06:25 PM, John Ferlan wrote: > > > On 9/21/18 5:29 AM, Michal Privoznik wrote: >> If there was a caller which would dup the client FD without >> CLOEXEC flag and later decided to change the flag it wouldn't be >> safe to do because fork() might have had occurred meantime. > > blank

Re: [libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-25 Thread John Ferlan
On 9/21/18 5:29 AM, Michal Privoznik wrote: > If there was a caller which would dup the client FD without > CLOEXEC flag and later decided to change the flag it wouldn't be > safe to do because fork() might have had occurred meantime. blank line > Switch to the other pattern - always dup FD wi

Re: [libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-21 Thread Marc Hartmayer
On Fri, Sep 21, 2018 at 11:29 AM +0200, Michal Privoznik wrote: > If there was a caller which would dup the client FD without > CLOEXEC flag and later decided to change the flag it wouldn't be > safe to do because fork() might have had occurred meantime. > Switch to the other pattern - always dup

[libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-21 Thread Michal Privoznik
If there was a caller which would dup the client FD without CLOEXEC flag and later decided to change the flag it wouldn't be safe to do because fork() might have had occurred meantime. Switch to the other pattern - always dup FD with the flag set and let callers clear the flag if they need to do so