exit(-1) doesn't make much sense, because they have to be in the range 0-255. Other values are basically reserved for the OS. On Linux, exit(-1) actually returns 255, but I'm not sure if that behavior is really guaranteed.