Convention of error codes on Linux and Windows

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

asked Apr 4, 2014 by Eric Z Ma (44,280 points)
edited Apr 7, 2014 by Eric Z Ma

1 Answer

 
Best answer

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:

/usr/include/asm-generic/errno-base.h

and

/usr/include/asm-generic/errno.h

You can view those for Linux 3.13.7 here:

https://file.systutorials.com/file/2014-04-04-4210-errno-base.h

https://file.systutorials.com/file/2014-04-04-1460-errno.h

Windows System Error Codes

For Windows, please find a list of error codes on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx

answered Apr 4, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...