Class child
hamigaki::process::child —
子プロセスを生成し、通信するためのクラス。
Synopsis
Description
child construct/copy/destruct
-
child(const std::string& path, const std::vector<std::string>& args,
const environment& env, const context& ctx = context());
| Effects: |
パスpathで示される実行ファイルを引数args、環境変数envで実行する。標準入出力と作業ディレクトリはctxに従う。 |
-
child(const std::string& path, const std::vector<std::string>& args,
const context& ctx = context());
| Effects: |
パスpathで示される実行ファイルを引数argsで実行する。標準入出力と作業ディレクトリはctxに従う。 |
| Notes: |
POSIX環境では、このコンストラクタの呼び出し中に環境変数を変更してはならない。 |
-
child(const std::string& path, const environment& env,
const context& ctx = context());
| Effects: |
パスpathで示される実行ファイルを環境変数envで実行する。標準入出力と作業ディレクトリはctxに従う。 |
-
child(const std::string& path, const context& ctx = context());
| Effects: |
パスpathで示される実行ファイルを実行する。標準入出力と作業ディレクトリはctxに従う。 |
| Notes: |
POSIX環境では、このコンストラクタの呼び出し中に環境変数を変更してはならない。 |
-
~child();
| Effects: |
wait()を呼び出していない場合、子プロセスを強制終了させる。 |
child modifiers
-
status wait();
| Effects: |
子プロセスの終了を待ち、終了状態を返す |
-
void terminate();
| Effects: |
子プロセスを強制終了させる |
| Notes: |
この関数は子プロセスに終了を促すだけで、実際に終了するまで待つことはない。 |
child queries
-
const char* get(const std::string& name) const;
| Returns: |
nameのエントリがあればその値、なければ0 |
-
pipe_sink stdin_sink();
| Returns: |
子プロセスの標準入力に接続されたパイプ |
-
pipe_source stdout_source();
| Returns: |
子プロセスの標準出力に接続されたパイプ |
-
pipe_source stderr_source();
| Returns: |
子プロセスの標準エラー出力に接続されたパイプ |