Definitions and explanations of errornumber in Linux

Source: Internet
Author: User
Definitions and explanations of errornumber commonly used in Linux systems-general Linux technology-Linux programming and kernel information. The following is a detailed description. Before explaining these error definitions, Let's see why we need to know these common error numbers?

For people who write C Programs, errno is not a strange variable, whether you are in the user or kernel state. In short, errno is used to save error information, which reflects the cause of the error. Therefore, a small errno can connect the user space programmer and the kernel space programmers to see their importance. However, our programmers often ignore this. They tend to focus only on correctness and errors, rather than accessing powerful errno for more information. For a common program, it may only be "no matter, you can restart it if it's a big deal ". However, for some important tasks, restarting may mean a disaster, especially in important fields. To this end, I would like to list common errno for you and remind you to "check errno when your routine failed when processing the device! ".

Linux errno is at 0. * There are only about 30 or 40 Linux kenel versions, but when linux kenel expands rapidly, the number of errno instances is also increasing. Specifically, how many errno instances are in your Linux version, you can view it through man errno or open the file directly:

Include/linux/errno. h

Here we only list some common or earliest errno:
QUOTE:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.