in reply to Re: Starting a process under Win32
in thread Starting a process under Win32

I'm starting an instance of VLC as a TCP server, then connecting to it. So I can't exec nor block. I'm currently using this code:
if( fork ) { system( "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe", "--rc-host", +"127.0.0.1:9999" ); exit; } sleep 1;
Which seems like a sub optimal solution as I'm creating a thread to do nothing but block on a system(). And I need that kind of hacky sleep to make sure the system() executes before I try opening the socket.