.TH "shevek::process" 3 "Wed Jul 9 2014" "libshevek" \" -*- nroff -*- .ad l .nh .SH NAME shevek::process \- .PP Create a process, optionally connection its standard in- and output streams to the calling program\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBshevek::refbase\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "Glib::RefPtr< \fBshevek::fd\fP > \fBin\fP ()" .br .RI "\fIThe standard input pipe, if it was requested\&. \fP" .ti -1c .RI "Glib::RefPtr< \fBshevek::fd\fP > \fBout\fP ()" .br .RI "\fIThe standard output pipe, if it was requested\&. \fP" .ti -1c .RI "Glib::RefPtr< \fBshevek::fd\fP > \fBerr\fP ()" .br .RI "\fIThe standard error pipe, if it was requested\&. \fP" .ti -1c .RI "pid_t \fBpid\fP ()" .br .RI "\fIThe process ID\&. \fP" .ti -1c .RI "\fB~process\fP ()" .br .RI "\fIThe destructor\&. This kills the process if it was still running\&. \fP" .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::list< std::string > &argv, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process from a filename and an argument list\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::list< std::string > &argv, std::list< std::string > const &envp, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process from a filename, an argument list and an environment\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBshell\fP (std::string const &command, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true, std::string const &sh='/bin/sh')" .br .RI "\fIRun a string with the shell\&. \fP" .ti -1c .RI "static std::string \fBrun\fP (std::string const &command, std::string const &sh)" .br .RI "\fIRun a process and return its output\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process without arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with one argument\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with two arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with three arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with four arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with five arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with six arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with seven arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, std::string const &a8, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with eight arguments\&. \fP" .ti -1c .RI "static Glib::RefPtr< \fBprocess\fP > \fBcreate\fP (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, std::string const &a8, std::string const &a9, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)" .br .RI "\fICreate a process with nine arguments\&. \fP" .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP Create a process, optionally connection its standard in- and output streams to the calling program\&. .SH "Member Function Documentation" .PP .SS "static std::string shevek::process::run (std::string const &command, std::string const &sh)\fC [static]\fP" .PP Run a process and return its output\&. A convenience function for running a process and catching its standard output in a string\&. This blocks until the process has exited\&. .SS "static Glib::RefPtr<\fBprocess\fP> shevek::process::shell (std::string const &command, boolpipe_stdin = \fCtrue\fP, boolpipe_stdout = \fCtrue\fP, boolpipe_stderr = \fCtrue\fP, std::string const &sh = \fC'/bin/sh'\fP)\fC [inline]\fP, \fC [static]\fP" .PP Run a string with the shell\&. Note that the process is forked from the shell, and so does not get killed when the process goes away\&. .SH "Author" .PP Generated automatically by Doxygen for libshevek from the source code\&.