The correct way to open [APUE] dup2
[APUE] things that wait for child processes
[APUE] using file record lock can’t realize interactive execution synchronization of parent-child process
Some questions about reading and writing multi process pipeline
Some questions about testing pipeline capacity
A question about [APUE] pipeline atomic writing quantity
[APUE] use poll to detect pipeline disconnection
Some questions about using Popen / Pclose
Doubts on [APUE] Popen / Pclose
[APUE] FIFO: a file that is not a file
[APUE] syslog causes accept error?
[APUE] how to handle TCP emergency data (OOB)?
[APUE] magic Solaris pipe
Remember a blood case caused by passing a file handle
Record a blood case caused by passing a file handle (Continued)
[APUE] started as a daemon, UNIX domain socket failed to listen?
[APUE] a small tool to view the current terminal flag bit settings
[APUE] use Ctrl + s to stop the output without suspending the foreground process
A mistake about pseudo terminal in [APUE]
The best time to start a tech blog was ten years ago (2010), followed by now.
When I was a university student, I tried my best to read some books, including some “textbook type” books: I listed a lot of concepts, and I read them attentively, but I forgot after reading them – there was no harvest.
After graduation, I remember that for the first time, I had the feeling of being in the top of my head. I was still reading MFC by Hou Jie. I really felt a sudden enlightenment after under hood.
At the same time, in order to have a deeper understanding of the contents of the book, I have read the whole MFC source code, and have some understanding of how to build a framework to simplify application development.
At the same time, I know that reading can’t be done without choice. If you want to read, you should read classic books and classic authors.
Later, I saw a series of Hou Jie’s works / Translations: Effective C + +, more effective c + +, essential C + +, deep exploration of C + + object model, and Win32 multithreaded programming;
There are other authors, such as:
Pan Aimin’s: effective STL, com principle and application; Li Shixian’s: Chinese version of C + + primer; glorious: C + + must know; Chen Weizhu’s: C + + templates;
Ma Weida’s “C + + network programming”, “C + + Network Programming II”; Song Jingshan’s: “one stop learning of Linux C programming”, “one stop learning of Linux C Programming II”;
When reading several books about C + + network by mavida, it is mainly based on ACE, a popular C + + network library at that time (2010). At that time, I also read the source code of ACE, and learned that there is a mountain outside the mountain, and there is a world of UNIX outside windows. Seeing that ace has no idea about the underlying system calls of cross platform encapsulation of various UNIX like systems, I secretly decided that I would have a chance to have a deep understanding of Linux programming interface.
In fact, looking back at ace now, it is indeed a bit bulky. Its code volume is even comparable to that of an early Linux kernel:), and many libraries specializing in network services (ASIO, libevent…) It’s very lightweight, and it doesn’t look like a lot of effort.
At that time, we also saw some very ingenious implementations of ACE, such as the implementation of leader / follower thread pool (internal hidden notification mechanism) through a lock, and even based on ACE The existing classes build a cross machine remote locking system, which are all amazing masterpieces. But what I regret most is that these things have not been recorded, so that now there are only some vague impressions, and I can’t say why. This is also an important driving force for me to start writing technology blogs, that is, writing articles is not only to share with others, but also a record of myself.
Later, I started to read the classic book Advanced Programming UNIX environment. The first few chapters were a bit boring, mainly about some basic knowledge. I thought I would not have read another textbook.
But the later, the more I feel that the author is not simply writing, there is a lot of practice behind him. It is likely that he is writing code and verifying various technical points at the same time.
Often a paragraph can extract three or four test cases to verify, and the author in each chapter of the exercise, is often some of his own problems in the verification process as the topic.
The author often states that he verifies a feature on four platforms (Linux / MAC / FreeBSD / Solaris), so if some features only exist on some platforms, he will give a prompt.
Here the author has a very rigorous attitude. I think the reason why classics are called classics and why masters become masters are all about this.
Learning from previous reading experience, we can neither read a Book blindly without understanding it, nor can we understand the practice without recording it,
So from this book, I started from the perspective of “engineer”, and personally verified each technical point in the book, and the verification passed, although what was said in the certificate was true;
If the verification fails, if you can find out the reason, you can deepen your understanding; if you can’t understand, you can put it first and make a mark, which will be solved when you look at the Linux source code in the future.
In a word, the readers who read this series of articles are those who have read the original book or are very familiar with Linux system programming and are interested in the underlying implementation of Linux. Otherwise, they will be confused and waste time.