<?xml version="1.0" encoding="windows-1252"?>
<node id="881361" title="Re^2: Working with other processes and programs" created="2011-01-09 10:49:21" updated="2011-01-09 10:49:21">
<type id="11">
note</type>
<author id="265959">
DeadPoet</author>
<data>
<field name="doctext">
Other thoughts to consider when evaluating return codes can include how the process was created. For example, if one uses the IPC::Open3 module to run the external command and the processes (pid) is killed using 'kill( 9, $pid )' the '$? &gt;&gt; 8' evaluation may result in 0. This is probably not the expected value, seeing how the processes was terminated. However, if one inspects the '${^CHILD_ERROR_NATIVE}' the result would show an exit value of 9.&lt;/p&gt; 

&lt;b&gt;According to PerlDoc:&lt;/b&gt;&lt;/p&gt;

&lt;i&gt;
If the filehandle came from a piped open, close returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, $! will be set to 0. Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into $? and ${^CHILD_ERROR_NATIVE}.
&lt;/i&gt;&lt;/p&gt;

[http://search.cpan.org/~jesse/perl-5.12.2/pod/perlfunc.pod]&lt;/p&gt;

Admittedly this may be a result of how things are terminated, closed and cleaned up. But it is a thought to consider.&lt;/p&gt;</field>
<field name="root_node">
1698</field>
<field name="parent_node">
198946</field>
</data>
</node>
