As far as I'm aware, every program in every major OS returns a value to the caller. You can get at this value by using echo $?
in Linux.
And you're correct that 0 generally means success and any other value generally indicates something went wrong. But exact values are program specific and do not have to conform to this norm.