rpm -qa within a c program
Hi
I have a C program that has the following line Code:
What i want to be able to do is test if a certain rpm is installed on the machine by writing the result of the above to version.txt. What i am finding is that the rpm is being written to the version.txt file but it does not do into the if but into the else when it should be going into the if. Have a got the wrong return value?? thanks Tara edit: sorry just released that this should probably go in programming? |
Shouldn't this be posted under Programming?
|
command failing?
perhaps you need to specify the full path to 'rpm'?
Depending on your current working dir at runtime, and the evironment (or lack there of) containing a search path... "rpm" may work for you in a shell, but not in the system() environment... |
All times are GMT -5. The time now is 04:58 AM. |