APUE Cpt 1
来源:互联网 发布:弱视治疗软件 编辑:程序博客网 时间:2024/06/04 01:29
读完了Advanced Programming in the UNIX Environment (APUE)chapter 1,但不能说学完了……嗯……蛮仔细的一点一点看的。
现在写写课后题?突然发现要上课了……好吧……先留着……
ok……拖了很久,终于开始写了。
1.1 Verify on your system that the directories dot and dot-dot are not the same, except in the root directory.
在linux或者unix目录下,dot(.)表示的是当前目录,dot-dot(..)表示父亲目录.
e.g../a.out 就是执行当前目录的a.out
e.g.cd .. 就是返回上层目录。其中根目录(/)的father-direction is itself.
1.2 In the output from the program in Figure 1.6, what happened to the processes with process IDs 852 and 853?
If we compile this program into the file a.out and execute it, we have $ ./a.out hello world from process ID 851 $ ./a.out hello world from process ID 854When this program runs, it calls the function getpid to obtain its process ID.Figure 1.6. Print the process ID#include "apue.h"intmain(void){ printf("hello world from process ID %d\n", getpid()); exit(0);}the UNIX is a multi-programming, or multitasking, system. Other processes were running at that time.
1.3 In Section 1.7, the argument to perror is defined with the ISO C attribute const, whereas the integer argument to strerror isn't defined with the attribute. Why?
1.4In the error-handing function err_sys in Appendix B, why is the value of errno saved when the function sis called?
太监了吧
写到这里,突然觉得写得没啥意思……答案哪里都有了,中文的,英文的……
还要我做什么?等我遇到没有答案的,找到答案再来写上吧……就把这个文章摆成现在残破的样子……倒也不错
In the output from the program in Figure 1.6, what happened to the processes with process IDs 852 and 853?
1.3In Section 1.7, the argument to perror is defined with the ISO C attribute const, whereas the integer argument to strerror isn't defined with this attribute. Why?
1.4In the error-handling function err_sys in Appendix B, why is the value of errno saved when the function is called?
1.5If the calendar time is stored as a signed 32-bit integer, in what year will it overflow? What ways can be used to extend the overflow point? Are they compatible with existing applications?
1.6If the process time is stored as a signed 32-bit integer, and if the system counts 100 ticks per second, after how many days will the value overflow?
- APUE Cpt 1
- cpt类型文件(.cpt)
- cpt类型文件(.cpt)
- apue-1
- APUE(1) ---- apue.h头文件记录
- APUE 1-1
- apue(1-3)
- apue(1-2)
- apue第一章 (1)
- apue 1 课后习题
- APUE 1-2
- APUE 1-3
- APUE 1-4
- APUE-1文件IO
- APUE学习笔记【1】
- apue
- APUE
- apue
- 软件随想录:程序员部落酋长Joel谈软件(阮一峰译)-4
- 过去的一年
- MySQL提示“too many connections”的解决办法
- 页面纵向滚动条居中
- spring aop expression简单说明
- APUE Cpt 1
- 软件随想录:程序员部落酋长Joel谈软件(阮一峰译)-5
- C#自己写农历日历
- 黑马程序员 – 学习面向对象设计原则 – 2012.12.29
- Unity3d之MonoBehavior的各个函数的执行顺序,回调,顺序,次数等
- 黑马程序员 – 学习Java5中的多线程(1) – 2012.10.29
- 盘点:崛起中的九大HTML5开发工具
- 黑盒测试工具汇总
- 黑马程序员 – 学习Java5中的多线程(2) – 2012.12.30