<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cutter-Experimental">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Experimental.top_of_page"
>Experimental</refentrytitle>
<manvolnum
>3</manvolnum>
<refmiscinfo
>Cutterライブラリ</refmiscinfo>
</refmeta>
<refnamediv>
<refname
>Experimental</refname>
<refpurpose
>実験的なAPI</refpurpose>
</refnamediv>

<refsect1 id="cutter-Experimental.functions" role="functions_proto">
<title role="functions_proto.title"
>Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row
><entry role="define_keyword"
>#define</entry
><entry role="function_name"
><link linkend="cut-fork"
>cut_fork</link
></entry
></row>
<row
><entry role="define_keyword"
>#define</entry
><entry role="function_name"
><link linkend="cut-wait-process"
>cut_wait_process</link
><phrase role="c_punctuation"
>()</phrase
></entry
></row>
<row
><entry role="define_keyword"
>#define</entry
><entry role="function_name"
><link linkend="cut-fork-get-stdout-message"
>cut_fork_get_stdout_message</link
><phrase role="c_punctuation"
>()</phrase
></entry
></row>
<row
><entry role="define_keyword"
>#define</entry
><entry role="function_name"
><link linkend="cut-fork-get-stderr-message"
>cut_fork_get_stderr_message</link
><phrase role="c_punctuation"
>()</phrase
></entry
></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="cutter-Experimental.description" role="desc">
<title role="desc.title"
>説明</title>
<para
>将来、このAPIは変更されるかもしれません。</para>

</refsect1>
<refsect1 id="cutter-Experimental.functions_details" role="details">
<title role="details.title"
>Functions</title>
<refsect2 id="cut-fork" role="macro" condition="since:0.8">
<title
>cut_fork</title>
<indexterm zone="cut-fork" role="0.8"
><primary
>cut_fork</primary
></indexterm>
<programlisting language="C"
>#define             cut_fork()</programlisting>
<para
>子プロセスを生成します。</para>
<para
>例:</para>
<informalexample
><programlisting role="example"
><![CDATA[
int pid;
pid = cut_fork();
cut_assert_errno();

if (pid == 0) {
  do_something_for_child_process();
  _exit(EXIT_SUCCESS);
}

do_something_for_parent_process();
]]></programlisting
></informalexample>
<para
></para>
<refsect3 id="cut-fork.returns" role="returns">
<title
>Returns</title>
<para
>プロセスID。</para>
</refsect3
><para role="since"
>Since: <link linkend="api-index-0.8"
>0.8</link
></para
></refsect2>
<refsect2 id="cut-wait-process" role="macro" condition="since:0.8">
<title
>cut_wait_process()</title>
<indexterm zone="cut-wait-process" role="0.8"
><primary
>cut_wait_process</primary
></indexterm>
<programlisting language="C"
>#define             cut_wait_process(pid, usec_timeout)</programlisting>
<para
><parameter
>pid</parameter
>で指定されたプロセスの終了を待ちます。</para>
<para
>例:</para>
<informalexample
><programlisting role="example"
><![CDATA[
int pid;
pid = cut_fork();
cut_assert_errno();

if (pid == 0) {
  do_something_for_child_process();
  _exit(EXIT_SUCCESS);
}

do_something_for_parent_process();
cut_assert_equal_int(EXIT_SUCCESS, cut_wait_process(pid, 100));
]]></programlisting
></informalexample>
<para
></para>
<refsect3 id="cut-wait-process.parameters" role="parameters">
<title
>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row
><entry role="parameter_name"
><para
>pid</para
></entry>
<entry role="parameter_description"
><para
>終了を待つプロセスのID。</para
></entry>
<entry role="parameter_annotations"
></entry
></row>
<row
><entry role="parameter_name"
><para
>タイムアウト。</para
></entry>
<entry role="parameter_description"
><para
>タイムアウトする時間。100万分の1秒単位で指定。</para
></entry>
<entry role="parameter_annotations"
></entry
></row>
</tbody
></tgroup
></informaltable>
</refsect3
><para role="since"
>Since: <link linkend="api-index-0.8"
>0.8</link
></para
></refsect2>
<refsect2 id="cut-fork-get-stdout-message" role="macro" condition="since:0.8">
<title
>cut_fork_get_stdout_message()</title>
<indexterm zone="cut-fork-get-stdout-message" role="0.8"
><primary
>cut_fork_get_stdout_message</primary
></indexterm>
<programlisting language="C"
>#define             cut_fork_get_stdout_message(pid)</programlisting>
<para
><parameter
>pid</parameter
>で指定されたプロセスからメッセージを読みます。</para>
<para
>例:</para>
<informalexample
><programlisting role="example"
><![CDATA[
int pid;
pid = cut_fork();
cut_assert_errno();

if (pid == 0) {
  g_print("I'm a child.");
  _exit(EXIT_SUCCESS);
}

cut_assert_equal_string("I'm a child.", cut_fork_get_stdout_message(pid));
cut_assert_equal_int(EXIT_SUCCESS, cut_wait_process(pid, 100));
]]></programlisting
></informalexample>
<para
></para>
<refsect3 id="cut-fork-get-stdout-message.parameters" role="parameters">
<title
>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row
><entry role="parameter_name"
><para
>pid</para
></entry>
<entry role="parameter_description"
><para
>プロセスID。</para
></entry>
<entry role="parameter_annotations"
></entry
></row>
</tbody
></tgroup
></informaltable>
</refsect3
><refsect3 id="cut-fork-get-stdout-message.returns" role="returns">
<title
>Returns</title>
<para
><parameter
>pid</parameter
>で指定されたプロセスの標準出力から読み込まれたメッセージ。</para>
</refsect3
><para role="since"
>Since: <link linkend="api-index-0.8"
>0.8</link
></para
></refsect2>
<refsect2 id="cut-fork-get-stderr-message" role="macro" condition="since:0.8">
<title
>cut_fork_get_stderr_message()</title>
<indexterm zone="cut-fork-get-stderr-message" role="0.8"
><primary
>cut_fork_get_stderr_message</primary
></indexterm>
<programlisting language="C"
>#define             cut_fork_get_stderr_message(pid)</programlisting>
<para
><parameter
>pid</parameter
>で指定されたプロセスからメッセージを読みます。</para>
<para
>例:</para>
<informalexample
><programlisting role="example"
><![CDATA[
int pid;
pid = cut_fork();
cut_assert_errno();

if (pid == 0) {
  g_print("I'm a child.");
  _exit(EXIT_SUCCESS);
}

cut_assert_equal_string("I'm a child.", cut_fork_get_stderr_message(pid));
cut_assert_equal_int(EXIT_SUCCESS, cut_wait_process(pid, 100));
]]></programlisting
></informalexample>
<para
></para>
<refsect3 id="cut-fork-get-stderr-message.parameters" role="parameters">
<title
>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row
><entry role="parameter_name"
><para
>pid</para
></entry>
<entry role="parameter_description"
><para
>プロセスID。</para
></entry>
<entry role="parameter_annotations"
></entry
></row>
</tbody
></tgroup
></informaltable>
</refsect3
><refsect3 id="cut-fork-get-stderr-message.returns" role="returns">
<title
>Returns</title>
<para
><parameter
>pid</parameter
>で指定されたプロセスの標準エラー出力から読み込まれたメッセージ。</para>
</refsect3
><para role="since"
>Since: <link linkend="api-index-0.8"
>0.8</link
></para
></refsect2>

</refsect1>

</refentry>
