<?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">実験</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>Cutterライブラリ</refmiscinfo>
</refmeta>
<refnamediv>
<refname>実験</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_return" colwidth="150px"/>
<colspec colname="functions_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.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">オブジェクト階層</title>
<screen>
</screen>
</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><![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/>
<refsect3 role="returns">
<title>Returns</title>
<para>プロセスID。</para>
<para/>
</refsect3><para role="since">0.8から</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>Waits a process specified by <parameter>pid</parameter>
.</para>
<para>例:</para>
<informalexample><programlisting><![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/>
<refsect3 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"/></row>
<row><entry role="parameter_name"><para>usec_timeout</para></entry>
<entry role="parameter_description"><para>タイムアウトする時間。100万分の1秒単位で指定。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">0.8から</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>Reads a message from a process specified by <parameter>pid</parameter>
.</para>
<para>例:</para>
<informalexample><programlisting><![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/>
<refsect3 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"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a message read from stdout of a process specified by <parameter>pid</parameter>
.</para>
<para/>
</refsect3><para role="since">0.8から</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>Reads a message from a process specified by <parameter>pid</parameter>
.</para>
<para>例:</para>
<informalexample><programlisting><![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/>
<refsect3 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"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a message read from stderr of a process specified by <parameter>pid</parameter>
.</para>
<para/>
</refsect3><para role="since">0.8から</para></refsect2>

</refsect1>
<refsect1 id="cutter-Experimental.other_details" role="details">
<title role="details.title">Types and Values</title>

</refsect1>

</refentry>
