[vlc-devel] Re: (SPAM 2)Re: Problem with exec(), system() popen() of VLC

Michael Pujos pujos at audemat-aztec.com
Wed May 24 17:26:37 CEST 2006

Michael Pujos wrote:

> Rémi Denis-Courmont wrote:
>> You CANNOT pipe into a daemonized process.
>>> Any idea to make this work would be greatly appreciated. I already
>>> tried a lot of things like -d or adding a '&' without success and
>>> everything I could think of using exec / popen.
>> Don't use the daemon option. Simply fork() before you call system().
> Thanks, that works. It was so obvious I didn't even think of it !

Spoke a bit too soon: it works perfectly in a non-threaded application 
but inside a pthread you never reach the code of the
parent (which is very strange, but forks in threads are described as a 
bit touchy)!

So with the following code in a pthread you never ever display "exit". 
system() (or exec() ) do some bad things :(

if(fork() == 0)
        String_t cmd = tb_String("dvbstream -f %s -rtp -o 8192 | vlc - 
-I dummy  --program %s --sout '#standard{access=http,mux=ts,dst=:3001}'",

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list