<?xml version="1.0" encoding="windows-1252"?>
<node id="1004442" title="Re: Global Variables Not Updated in Child Process" created="2012-11-18 12:19:53" updated="2012-11-18 12:19:53">
<type id="11">
note</type>
<author id="747201">
afoken</author>
<data>
<field name="doctext">
&lt;p&gt;You seem to have a problem understanding the concept behind &lt;c&gt;fork()&lt;/c&gt;. &lt;c&gt;fork&lt;/c&gt; creates an exact copy of the current process, assigns it a new process ID, and makes both processes run independantly. Some things are shared, like file handles, but most (like memory) are not. &lt;small&gt;(Actually, modern operating systems initially share most memory of both processes and use a copy-on-write mechanism to avoid expensive copy operations as long as possible.)&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;What you expect here is that your child will also have a hangover after only you got drunk.&lt;/p&gt;
&lt;p&gt;Alexander&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-747201"&gt;
--&lt;br&gt;
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1004124</field>
<field name="parent_node">
1004124</field>
</data>
</node>
