[Chicago-talk] return value of failed system call

Andy_Bach at wiwb.uscourts.gov Andy_Bach at wiwb.uscourts.gov
Tue Aug 2 09:34:39 PDT 2011


my $result = system("yum -y install NotA_real_package.hah-ha");

> and $result comes back as "0" just as it does when I successfully 
install a package. I am using CentOS. 

Because yum is saying - "I didn't find that, but everything worked as 
expected otherwise"
# yum -y install NotA_real_package.hah-ha
Loaded plugins: downloadonly, rhnplugin, security
Setting up Install Process
No package NotA_real_package.hah-ha available.
Nothing to do
# echo $?
0

"info" though ...
# yum info NotA_real_package.hah-ha
Loaded plugins: downloadonly, rhnplugin, security
Error: No matching Packages to list
# echo $?
1

a
----------------------
Andy Bach
Systems Mangler
Internet: andy_bach at wiwb.uscourts.gov
Voice: (608) 261-5738, Cell: (608) 658-1890

"Nod's as good as a wink to a blind bat!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20110802/6320fb74/attachment.html>


More information about the Chicago-talk mailing list