Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
46 user(s) are online (32 user(s) are browsing Forums)

Members: 0
Guests: 46

more...

Support us!

Headlines

 
  Register To Post  

Return Codes
Quite a regular
Quite a regular


See User information
I want to be able to get the exit status of a C program. I can do that in the SH context:

./main ; echo $?


Can this be done in a normal shell environment without the SH context? It seems that return code is totally not the exit status of the main function. For that matter, how to set a proper Amiga return code? With a program that returns "10", followed by "why" I still see that the program did not set a return code.

Thank you.

Go to top
Re: Return Codes
Just can't stay away
Just can't stay away


See User information
Not sure whether those are what you're looking for, but try echoing $RC and/or $Result2 after executing the program.

Best regards,

Niels

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
6 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project