[vlc-devel] vlc: svn commit r22950 (funman)
Rafaël Carré
funman at videolan.org
Mon Nov 5 12:29:47 CET 2007
Le Mon, 5 Nov 2007 08:49:29 +0100,
Remi Denis-Courmont <rdenis at simphalempin.com> a écrit :
>
> On Mon, 5 Nov 2007 00:42:06 +0100 (CET), Subversion daemon
> <svn at videolan.org> wrote:
> > r22950 | funman | 2007-11-05 00:42:06 +0100 (Mon, 05 Nov 2007) | 3
> > lines Changed paths:
> > M /trunk/modules/misc/screensaver.c
> >
> > screensaver: replaces system() calls by fork()/execv()/waitpid()
> > A side effect is that on FreeBSD the console is not filled anymore
> > with "xscreensaver-xxx not found", because "/bin/sh xx 2>&-" will
> > not close stderr if the specified command doesn't exist.
>
>
> That is very ugly. Closing stdout and stderr is wrong.
> You should probably freopen("/dev/null", "w", {stdout, stderr})
> instead.
>
What is the problem ?
We used >&- and 2>&- in system() anyway:
[n]>&- close stdout (or file descriptor n)
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
--
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20071105/f9d3642a/attachment.sig>
More information about the vlc-devel
mailing list