I don't know how platform specific exec() and its relatives are, but my guess is it'd have to be.
I'm running an executable from a C++ program this way:
When I use this to call a test program I've written in C++, it works and each string is taken as a separate argument. Then when I change from my test program to using Xine, I change the first argument to a music file that's in the same directory and remove the 2nd argument. If I run Xine from the command like this:Code:string cmd = "testprog", arg = "samp1", marg = "one two three"; execlp(cmd.c_str(), arg.c_str(), marg.c_str(), (char *) 0);
it works just fine, but when I try to run it from my program, with xine as the first argument to execlp() and the file name as the 2nd, it doesn't play or do anything.
To me, this isn't just a Xine issue. Whatever is making it not work with Xine could have the same effect with other programs.
Why is it that Xine won't read in the argument and play it? Could the program specifically be checking to see how it is run and acting differently? Is this a problem I'll be running into with a lot of programs?
Any help appreciated!