Convention of error codes on Linux and Windows

What’s the error code conventions on Linux and Windows?

Linux and Windows use 0 to indicate that the operation is successful and an integer that is larger than 0 for some errors.

Linux System Error Codes

On Linux, the system error codes is defined in 2 headers which you can find on your own box:




You can view those for Linux 3.13.7 here:

Windows System Error Codes

For Windows, please find a list of error codes on MSDN:

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *