├── .gitignore ├── README.md ├── chapter0 ├── 0.1 │ └── 0_1_hello_world.c ├── 0.4.3 │ └── 0_4_3_threads_cnt.c └── 0.4.5 │ └── 0_4_5_signal_mutex.c ├── chapter1 ├── 1.12.3 │ └── 1_12_3_wrong_pid.c └── 1.2.1 │ └── 1_2_1_open_4param.c ├── chapter15 ├── 15.1 │ └── 15_1_memcmp_struct.c └── 15.2 │ └── 15_2_shift_sign_unsigned.c ├── chapter2 ├── 2.2 │ └── 2_2_fork_printf.c ├── 2.5 │ └── 2_5_both_read_write.c ├── 2.7 │ └── 2_7_clearerr.c └── 2.9 │ └── 2_9_fread_fwrite.c ├── chapter3 ├── 3.1 │ └── 3_1_before_main.c ├── 3.3.1 │ └── 3_3_1_atexit.c ├── 3.3.2 │ └── 3_3_2_atexit.c ├── 3.4 │ ├── 3_4_putenv.c │ └── 3_4_setenv.c ├── 3.5.2 │ ├── 3_5_2_dlib.c │ ├── 3_5_2_main.c │ └── 3_5_2_main_mlib.c ├── 3.6.3 │ └── 3_6_3_mem.c ├── 3.7.1 │ └── 3_7_1_longjump.c └── 3.7.3 │ ├── 3_7_3_longjmp_trap1.c │ └── 3_7_3_longjmp_trap2.c ├── chapter4 └── 4.9.1 │ └── t_sys.c └── chapter6 └── 6.7 └── tkill.c /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aple_codes 2 | It is the demo or test codes of book 《Linux环境编程 —— 从应用到内核》 3 | -------------------------------------------------------------------------------- /chapter0/0.1/0_1_hello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int main(void) 5 | { 6 | printf("Hello world\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /chapter0/0.4.3/0_4_3_threads_cnt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter0/0.4.3/0_4_3_threads_cnt.c -------------------------------------------------------------------------------- /chapter0/0.4.5/0_4_5_signal_mutex.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter0/0.4.5/0_4_5_signal_mutex.c -------------------------------------------------------------------------------- /chapter1/1.12.3/1_12_3_wrong_pid.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter1/1.12.3/1_12_3_wrong_pid.c -------------------------------------------------------------------------------- /chapter1/1.2.1/1_2_1_open_4param.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter1/1.2.1/1_2_1_open_4param.c -------------------------------------------------------------------------------- /chapter15/15.1/15_1_memcmp_struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter15/15.1/15_1_memcmp_struct.c -------------------------------------------------------------------------------- /chapter15/15.2/15_2_shift_sign_unsigned.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter15/15.2/15_2_shift_sign_unsigned.c -------------------------------------------------------------------------------- /chapter2/2.2/2_2_fork_printf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter2/2.2/2_2_fork_printf.c -------------------------------------------------------------------------------- /chapter2/2.5/2_5_both_read_write.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter2/2.5/2_5_both_read_write.c -------------------------------------------------------------------------------- /chapter2/2.7/2_7_clearerr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter2/2.7/2_7_clearerr.c -------------------------------------------------------------------------------- /chapter2/2.9/2_9_fread_fwrite.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter2/2.9/2_9_fread_fwrite.c -------------------------------------------------------------------------------- /chapter3/3.1/3_1_before_main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.1/3_1_before_main.c -------------------------------------------------------------------------------- /chapter3/3.3.1/3_3_1_atexit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.3.1/3_3_1_atexit.c -------------------------------------------------------------------------------- /chapter3/3.3.2/3_3_2_atexit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.3.2/3_3_2_atexit.c -------------------------------------------------------------------------------- /chapter3/3.4/3_4_putenv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.4/3_4_putenv.c -------------------------------------------------------------------------------- /chapter3/3.4/3_4_setenv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.4/3_4_setenv.c -------------------------------------------------------------------------------- /chapter3/3.5.2/3_5_2_dlib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.5.2/3_5_2_dlib.c -------------------------------------------------------------------------------- /chapter3/3.5.2/3_5_2_main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.5.2/3_5_2_main.c -------------------------------------------------------------------------------- /chapter3/3.5.2/3_5_2_main_mlib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.5.2/3_5_2_main_mlib.c -------------------------------------------------------------------------------- /chapter3/3.6.3/3_6_3_mem.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.6.3/3_6_3_mem.c -------------------------------------------------------------------------------- /chapter3/3.7.1/3_7_1_longjump.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.7.1/3_7_1_longjump.c -------------------------------------------------------------------------------- /chapter3/3.7.3/3_7_3_longjmp_trap1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.7.3/3_7_3_longjmp_trap1.c -------------------------------------------------------------------------------- /chapter3/3.7.3/3_7_3_longjmp_trap2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter3/3.7.3/3_7_3_longjmp_trap2.c -------------------------------------------------------------------------------- /chapter4/4.9.1/t_sys.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter4/4.9.1/t_sys.c -------------------------------------------------------------------------------- /chapter6/6.7/tkill.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfreewind/aple_codes/HEAD/chapter6/6.7/tkill.c --------------------------------------------------------------------------------