<?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 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Experimental</refname>
<refpurpose>Experimental 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.description" role="desc">
<title role="desc.title">Description</title>
<para>This API may be changed in the future.</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>Makes child process.</para>
<para>e.g.:</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></para>
<refsect3 id="cut-fork.returns" role="returns">
<title>Returns</title>
<para> Process 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>Waits a process specified by <parameter>pid</parameter>
.</para>
<para>e.g.:</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></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>Process ID to wait.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>usec_timeout</para></entry>
<entry role="parameter_description"><para>Timeout in usec.</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>Reads a message from a process specified by <parameter>pid</parameter>
.</para>
<para>e.g.:</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></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>Process 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> a message read from stdout of a process specified by <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>Reads a message from a process specified by <parameter>pid</parameter>
.</para>
<para>e.g.:</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></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>Process 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> a message read from stderr of a process specified by <parameter>pid</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-0.8">0.8</link></para></refsect2>

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

</refsect1>

</refentry>
