[vlc-devel] [PATCH] V4L for FreeBSD userland libv4l{1, 2} wrapper library
Rafaël Carré
rafael.carre at gmail.com
Wed Nov 18 11:49:13 CET 2009
On Wed, 18 Nov 2009 11:30:19 +0100
Rémi Denis-Courmont <remi at remlab.net> wrote:
>
> On Wed, 18 Nov 2009 17:27:00 +0800, Buganini <buganini at gmail.com>
> wrote:
> > 2009/11/17 Rémi Denis-Courmont <remi at remlab.net>:
> >> Do those functions set the close-on-exec flag? If not, you may
> >> have a
> > problem
> >> (because VLC does fork-and-exec in other threads).
> >
> > No, I think, there is no FD_CLOEXEC in source code.
>
> Then your patch is wrong. That's why we use(d) utf8_open() instead of
> open() here.
>
> Besides, FD_CLOEXEC is not sufficient. You need to create the file
> descriptor with close-on-exec flag. On Linux, there is O_CLOEXEC for
> this. Don't know about FBSD.
We could use v4l2_open(...,. ...|O_CLOEXEC) with O_CLOEXEC defined to 0
if it's undef.
http://linuxtv.org/hg/v4l-dvb/file/e341e9e85af2/v4l2-apps/libv4l/libv4l2/libv4l2.c
transmits the mode to SYS_OPEN()
Would it be enough?
--
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091118/3fde2e84/attachment.sig>
More information about the vlc-devel
mailing list