I have a 1st clue, as soon as I start re-directing stdout my script fails. Code:
int my_pipe[2];
if(pipe(my_pipe) == -1)
{
fprintf(stderr, "Error creating pipe\n");
}
pid_t pID = fork();
if (pID == 0) // child
{
close(my_pipe[0]); // child doesn't read
dup2(my_pipe[1], 1); // redirect stdout
execl(prog,prog,args, (char *) 0);
}
int my_pipe[2];
if(pipe(my_pipe) == -1)
{
fprintf(stderr, "Error creating pipe\n");
}
pid_t pID = fork();
if (pID == 0) // child
{
close(my_pipe[0]); // child doesn't read
dup2(my_pipe[1], 1); // redirect stdout
execl(prog,prog,args, (char *) 0);
}
To copy to clipboard, switch view to plain text mode
I think the problem might most likely be in the script than in Qt
Bookmarks