echo $?
The exit status of the previous command, or the return value of the function.
ref: http://c.biancheng.net/cpp/view/2739.html