greenmoss has asked for the wisdom of the Perl Monks concerning the following question:
It returns 0 exit code:my $code = system(q{apt-get -qq -o 'Debug::NoLocking=true' --simulate +upgrade}); print "code: "; print ($code & 127); print ";\n";
But the command, run manually from the command line produces exit code 100:code: 0;
Why is this? How do I get the "real" return code?$ apt-get -qq -o 'Debug::NoLocking=true' --simulate upgrade E: Unmet dependencies. Try using -f. $ echo $? 100
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "system" returns different exit code than running the command from the command line
by moritz (Cardinal) on Jun 04, 2008 at 18:12 UTC | |
by greenmoss (Novice) on Jun 04, 2008 at 18:36 UTC |