Thanks for your answer CornedBeef,
You are right , it has to do with that tilde '~'.
So I modified it to: /home/userme/Development/Projects/somecmd
Code:
char* avlong = {
"/home/userme/Development/Projects/somecmd",
"-c 604 -n 1 -f 550"
}
if(execv(avlong[0], avlong) <0)
printf("Failed to execute command.\n");
else printf("Yeah! It works!\n");
But than the arguments seems not be recognized somehow.
So I tried several ways, like:
Code:
char* avlong = {
"/home/userme/Development/Projects/somecmd",
"somecmd",
"-c 604",
"-n 1",
-f 550",
"\0"
}
//even this:
char* avlong = {
"/home/userme/Development/Projects/somecmd",
"somecmd",
"-c",
"604",
"-n",
"1",
"-f",
"550",
(char*) 0
}
However, the called program respond with missing argument.
I'm just one step from succes
thank you...