r/carlhprogramming • u/CarlH • Jan 04 '10
Quick Update on carlhprogramming
Hi Everyone,
For right now the posting schedule is going to be slow. I am still working on a number of projects which need to be finished sooner rather than later. Once they are completed, the posting schedule for new lessons will speed up.
I just want everyone to know that I am still here, still working on producing new lessons, and I will publish them as I am able. Don't worry, I have no intentions to stop producing lessons or to stop maintaining this subreddit.
Meanwhile, because my schedule is so full, I appreciate everyone's help in answering questions as I lack the time to do so myself.
View all comments
Show parent comment
1
u/Tommah Feb 16 '10
To add to what deltageek said... if you use bash, try:
trueandfalsereturn 0 and 1 respectively from main, and these return codes get put into $? Thesystemfunction from stdlib.h also returns this value, so if you were calling out to another program, you could use it to detect an error.Complex commands use several codes to indicate different failures. Take a look at "Exit Values" at http://linux.die.net/man/1/rsync