It seems to be a famous book so I bought it <a target="_blank" href="https://www.amazon.co.jp/gp/product/4797328355/ref=as_li_tl?ie=UTF8&camp=247&creative=1211&creativeASIN=4797328355&linkCode=as2&tag=lespacetranqu-22&linkId=b690c3257ff896f2239f1107e > Ordinary Linux programming The royal road of gcc programming that can be learned from the mechanism of Linux <img src = "// ir-jp.amazon-adsystem.com/e/ir?t=lespacetranqu-22&l=am2&o=9&a=4797328355" "width =" 1 "height =" 1 "border =" 0 "alt =" "style =" border: none! Important; margin: 0px! Important; "/> <a target="_blank" href="https://www.amazon.co.jp/gp/product/B075ST51Y5/ref=as_li_tl?ie=UTF8&camp=247&creative=1211&creativeASIN=B075ST51Y5&linkCode=as2&tag=lespacetranqu-22&linkId=aa0915aa60a5a > Ordinary Linux programming 2nd edition: The royal road of gcc programming that can be learned from the mechanism of Linux <img src = "// ir-jp.amazon-adsystem.com/e/ir?t=lespacetranqu-22&l=am2&o=" 9 & a = B075ST51Y5 "width =" 1 "height =" 1 "border =" 0 "alt =" "style =" border: none! Important; margin: 0px! Important; "/>
Try normal Linux programming Part 1 https://qiita.com/uturned0/items/b9ae846f2aff5865c074 Try normal Linux programming Part 2 https://qiita.com/uturned0/items/56beac990cdd6f1059ed Try normal Linux programming Part 3 https://qiita.com/uturned0/items/675092da8aa89c4b1ff0 Part 4 https://qiita.com/uturned0/items/8f5765cfc0f0be8a1981 Part 5 https://qiita.com/uturned0/items/ab97deb489c994a836da
Chapter 3
File in a broad sense symlink, text, binary All files.
File in a narrow sense regular file different things directory symlink device file such as /dev/sda named pipe Not covered in this document unix domain socket not handled
What is a device file? / dev / sda is a block device file Character device files are printer, modem / dev / null, / dev / zero, / dev / random are also device files.
file system procfs, tmpfs, devfs are pseudo filesystems
Typical reasons for having a process ID are signal, ctrl + c
stream A byte stream through which bytes flow. Words only for this book. It seems to be called file, open file
file type value STREAMS kernel module
In other books, it may be used to mean ↑
Use system call read / write to read a sequence of bytes from a stream, and so on
device file is the starting point for getting a stream
From process a through kernel to process b ** Pipe **
Same as pipe for cat x | grep x
Streams can also be exchanged across networks.
IPC interprocess communication
file system --process --process It is a stream that connects all
chapter 3 End
Recommended Posts