- * spawn a new process and redirect fd 0, 1, and 2
- *
- * \param pid will hold the pid of the created process upon return
- * \param file path of the executable to execute
- * \param args the argument array for the command
- * \param fds a pointer to a value-result array
- *
- * This function uses fork/exec to create a new process. \a fds must be a
- * pointer to three integers, corresponding to stdin, stdout and stderr
- * respectively. It specifies how to deal with fd 0, 1, 2 in the child. The
- * contents of \a fds are interpreted as follows:
- *
- * - fd[i] < 0: leave fd \a i alone
- * - fd[i] = 0: dup fd \a i to /dev/null
- * - fd[i] > 0: create a pipe and dup i to one end of that pipe.
- * Upon return, fd[i] contains the file descriptor of the pipe.