<?xml version="1.0" encoding="windows-1252"?>
<node id="198946" title="Re: Working with other processes and programs" created="2002-09-18 14:25:09" updated="2005-07-28 08:49:16">
<type id="11">
note</type>
<author id="194935">
Linuxboy</author>
<data>
<field name="doctext">
Here are a few additional related details:&lt;p&gt;
&lt;p&gt;
My pid is in $$ or is returned by getpgrp(0)&lt;p&gt;
My parent's pid is getppid()&lt;p&gt;
&lt;p&gt;
Launching a process and *not* waiting is done with fork but read the fork docs before using it because it doesn't work like you might expect...  Using open instead of fork is probably a better choice much of the time.&lt;p&gt;
&lt;p&gt;
Closing the opened handle without reading the output dumps the output to stdout. (this could be implementation specific??)&lt;p&gt;
&lt;p&gt;
You can get the exit code of the child process from $? &gt;&gt;8&lt;p&gt;
&lt;p&gt;
Linuxboy&lt;p&gt;
</field>
<field name="root_node">
1698</field>
<field name="parent_node">
1698</field>
</data>
</node>
