<?xml version="1.0" encoding="windows-1252"?>
<node id="625965" title="Re^6: perl and sudo basic question" created="2007-07-11 03:54:19" updated="2007-07-10 23:54:19">
<type id="11">
note</type>
<author id="184363">
Tomte</author>
<data>
<field name="doctext">
&lt;p&gt;
&lt;blockquote&gt;
I haven't seen hello in the display OR the file /tmp/testfile has not been created. The "result" code is 256, what does it mean.
&lt;/blockquote&gt;
Normaly you would do &lt;code&gt;my $realexitcode = $exitcode &gt;&gt; 8;&lt;/code&gt;, assuming that [cpan://Sudo.pm] uses [perldoc://system] to execute sudo -- in this case this is &lt;tt&gt;1&lt;/tt&gt;.
Looking into &lt;tt&gt;sudo&lt;/tt&gt;s man-page:
&lt;blockquote&gt;
RETURN VALUES
       Upon successful execution of a program, the return value from sudo will simply be the return value of the program that was executed.

       Otherwise, sudo quits with an exit value of 1 if there is a configuration/permission problem or if sudo cannot execute the given command.
&lt;/blockquote&gt;
&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-184363"&gt;
&lt;p&gt;
regards,&lt;br /&gt;
tomte
&lt;hr /&gt;
&lt;/p&gt;
&lt;p align="right"&gt;
       An intellectual is someone whose mind watches itself.&lt;br&gt;-- Albert Camus
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
625721</field>
<field name="parent_node">
625838</field>
</data>
</node>
