// <org.stdplus/posix/popen3.hpp>

namespace org
  namespace stdplus
    namespace posix
      int popen3(int fd[3],const char **const cmd);
    } // namespace posix
  } // namespace stdplus
} // namespace org


Start a process, with stdin, stdout, and stderr redirected to pipes whose file descriptors are stored in fd.


  • cmd is a null-terminated list of null-terminated strings representing the command to execute.


  • fd[STDIN_FILENO] is the write-side of the child STDIN pipe. Close using close()
  • fd[STDOUT_FILENO] is the read-side of the child’s STDOUT pipe. Close using close()
  • fd[STDERR_FILENO] is the read-side of the child’s STDERR pipe. Close using close()
  • result is child’s process id.