LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-15-2009, 03:17 PM   #1
carinos.carlos
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Rep: Reputation: 0
Urgent


Hi

I have a C Routine like this

int myPrint (char *cmd)
{
int ret = 0;

ret = system(cmd);

return ret;

}


in HP UX returns zero

in Oracle Linux return -1

Any idea why the difference ?

If I regard the return value both work fine in order that comand is executed by the program

Thanks any hint or link


C@riņos C@rlos
 
Old 08-15-2009, 03:22 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
Urgent
Please use a title which discribes the problem.
It is only urgent to you.
 
Old 08-15-2009, 03:33 PM   #3
carinos.carlos
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Return code for system calls i different *nix "flavors"

Quote:
Originally Posted by carinos.carlos View Post
Hi

I have a C Routine like this

int myPrint (char *cmd)
{
int ret = 0;

ret = system(cmd);

return ret;

}


in HP UX returns zero

in Oracle Linux return -1

Any idea why the difference ?

If I regard the return value both work fine in order that comand is executed by the program

Thanks any hint or link


C@riņos C@rlos

I regret my type misleading in the subject
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot sector and lilo collapse !!!!! URGENT URGENT URGEN !!!!! frelihm Linux - Software 21 12-02-2009 11:21 AM
Urgent Question Regarding Urgent Questions! Need Help Now! Crashed_Again LQ Suggestions & Feedback 11 10-17-2007 09:07 PM
Urgent Urgent !!!! Mozilla Keeps All Your Deleted Emails !!!! odin123 Linux - Software 2 01-31-2004 03:22 AM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration