Re: [PATCH 1/2] v4l-helpers: Don't close the fd in {}_s_fd

2018-06-29 Thread Ezequiel Garcia
Hey Hans, On Fri, 2018-06-29 at 09:03 +0200, Hans Verkuil wrote: > On 06/28/2018 09:25 PM, Ezequiel Garcia wrote: > > When creating a second node via copy or assignment: > > > > node2 = node > > > > The node being assigned to, i.e. node2, obtains the fd. > > This causes a later call to node2

Re: [PATCH 1/2] v4l-helpers: Don't close the fd in {}_s_fd

2018-06-29 Thread Ezequiel Garcia
On Fri, 2018-06-29 at 09:03 +0200, Hans Verkuil wrote: > On 06/28/2018 09:25 PM, Ezequiel Garcia wrote: > > When creating a second node via copy or assignment: > > > > node2 = node > > > > The node being assigned to, i.e. node2, obtains the fd. > > This causes a later call to node2.media_open

Re: [PATCH 1/2] v4l-helpers: Don't close the fd in {}_s_fd

2018-06-29 Thread Hans Verkuil
On 06/28/2018 09:25 PM, Ezequiel Garcia wrote: > When creating a second node via copy or assignment: > > node2 = node > > The node being assigned to, i.e. node2, obtains the fd. > This causes a later call to node2.media_open to close() > the fd, thus unintendenly closing the original node fd,

[PATCH 1/2] v4l-helpers: Don't close the fd in {}_s_fd

2018-06-28 Thread Ezequiel Garcia
When creating a second node via copy or assignment: node2 = node The node being assigned to, i.e. node2, obtains the fd. This causes a later call to node2.media_open to close() the fd, thus unintendenly closing the original node fd, via the call path (e.g. for media devices): node2.media_o