So usually exit(0) means a success and exit(1) a failure. exit(0) behave like return 0 in main() function, exit(1) behave like return 1 . The standard is, that main function return 0 , if program ended successfully while non-zero value means that program was terminated with some kind of error.