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