Get return code from C program

140 pts.
Tags:
C program
C programming
Hello, I would like to know if there a way to call a C program within another C program and to get its return code. Thanks

Software/Hardware used:
ibm i

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    There might be. But we can't be sure without knowing what C compiler was used (for both called and calling programs), and maybe what OS it all runs on and possibly the platform. . Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Ah, I just saw the "IBM i" note under 'Software/hardware used'. That narrows down the platform, but both OS and compiler are still needed. "IBM i" might refer to the OS or the box. AIX and Linux might be involved, and PASE might cover multiple C compilers. . Tom
    125,585 pointsBadges:
    report
  • al7iss
    They are running under OS/400 V7R1 for both programs and they are compiled by gnu icc compiler
    140 pointsBadges:
    report
  • TomLiotta
    They are running under OS/400 V7R1 for both programs and they are compiled by gnu icc compiler
    .
    If the GNU icc compiler was used, then the programs must be running under PASE (which is an AIX run-time that runs under i 7.1).
    .
    I'll have to do some research to see how such C programs create and retrieve return codes, but someone else might have the knowledge handy now that we know what we're discussing.
    .
    Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following