"Linux C Programming Practice"-my error-Correcting notes

Source: Internet
Author: User
Tags stdin

All for reference only, welcome anyone to discuss

[Page] 151 [position] my_rwl.c [Type] Code error

[Description] From the book to see __LINE__, is an underscore, but in fact, the built-in macro is the front and back of each of the two sliding lines, namely _ _line_ _

[Page] 195 [position] studyuid.c [Type] Code error

[Description] The header file for Strerror () is string.h and needs to be added before code can run

[Page] 251 [position] ctrlpocess.c [Type] Code error

[description] Read function declaration: ssize_t Read (int fd, void *buf, size_t count), and stdin declaration is extern FILE *stdin, so read (stdin,buf,1024) does not match , change to read (0,buf,1024)

[Page] 299 [position] middle [type] Description deviation PS: Pending discussion

[description] int select (int Nfds, fd_set *readfds, Fd_set *writefds,fd_set *exceptfds, struct timeval *timeo UT);

The explanation for Nfds is this: the number of file descriptors that need to be monitored, and the explanation after man is

Nfds is the highest-numbered file descriptor in any of the three sets "the size of the highest value in all file descriptors"

Usage advice: Take the maximum file description Fugai

"Linux C Programming Practice"-my error-Correcting notes

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.