Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^6: perl and sudo basic question

by Tomte (Priest)
on Jul 11, 2007 at 07:54 UTC ( #625965=note: print w/replies, xml ) Need Help??

in reply to Re^5: perl and sudo basic question
in thread perl and sudo basic question

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.
Normaly you would do my $realexitcode = $exitcode >> 8;, assuming that uses system to execute sudo -- in this case this is 1. Looking into sudos man-page:
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.


An intellectual is someone whose mind watches itself.
-- Albert Camus

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://625965]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2016-10-24 02:19 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (302 votes). Check out past polls.