Linux系统编程:动手实践“演示”程序
System Programming in Linux: A Hands-On Introduction "Demo" Programs

原始链接: https://github.com/stewartweiss/intro-linux-sys-prog

该仓库托管了书籍“Linux系统编程:实践入门”(No Starch Press,亚马逊购买链接:[https://www.amazon.com/System-Programming-Linux-Stewart-Weiss/dp/1718503563](https://www.amazon.com/System-Programming-Linux-Stewart-Weiss/dp/1718503563))的源代码。 请注意,代码可能与书籍的初版印刷有所不同(可通过`firstprinting`分支获取)。自最新印刷版以来的更改在`CHANGES`文件中详细说明。代码采用GNU GPLv3(程序)和GNU LGPLv3(库 – `common/`和`include/`目录)许可。 仓库按章节组织(例如`ChapterNN`),另有包含头文件、库和makefile的目录。要构建程序,首先`cd`进入`common`目录并运行`make`,然后运行`make install`。这将设置必要的头文件和库。然后,导航到所需的章节目录并运行`make`。每个章节可能都有一个特定的`README`文件,其中包含进一步的说明。欢迎报告错误或改进建议。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Linux系统编程:实践介绍 “Demo”程序 (github.com/stewartweiss) 11点 由 teleforce 2小时前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

This repository contains source code for the programs in my book, "System Programming in Linux: A Hands-On Introduction". The book is published by No Starch Press and available on Amazon here: https://www.amazon.com/System-Programming-Linux-Stewart-Weiss/dp/1718503563. You can read more about it on the webpage https://nostarch.com/introduction-system-programming-linux. The code in this repository might be different than what is currently in the book. To see the code from the first printing of the book, checkout the firstprinting branch.

For instructions on building the programs, see the section `How To Use This Repository'.

For notes on changes that have been made to the code since the book's most recent printing, see the CHANGES file.

All complete programs provided in this repository are covered by the GNU General Public License (Version 3), a copy of which is contained in the file COPYING.gplv3 in this directory. The source code for all library functions (in the common/ and include/ directories) is covered by the GNU Lesser General Public License (Version 3), a copy of which is in the file COPYING.lgplv3 in this directory.

Organization of Subdirectories

The subdirectories are either named by chapter, in the form ChapterNN, or have names such as "include", "lib", "makefiles", and so forth. The ChapterNN directories contain code introduced in the corresponding chapter of the book. The other chapters are self-explanatory.

I welcome suggestions, corrections, discovery of bugs, and other improvements. At present there is no CONTRIBUTING file because the instructions are fairly simple --- If you see something that needs improvement, create an issue with as much detail as possible. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.

How To Use This Repository

Each chapter is a self-contained collection of programs. If a chapter has a README file, you should read that file before doing anything in that chapter.

All program code depends on the files in the common directory. To build the programs in any chapter, you must set up your environment as follows:

  1. After cloning the repository, cd into the common directory and run make:

  2. Then run make install in that directory:

    This copies the header file created by make into the include directory in this repository, and the static library libutils.a into the lib directory.

  3. Now cd into the chapter you'd like to build and run make there, e.g.

联系我们 contact @ memedata.com