/* * 1.10ReadCommandsFromStandardInputAndExecuteThem.cpp * * Created on: Feb 11, 2015 * Author: sunyj */ #include "../apuesunyj.h"
#include static voi...
分类:
其他好文 时间:
2015-03-07 19:57:59
阅读次数:
297
man 3 errno /* * 1.8DemonstrateStrerrorAndPerror.cpp * * Created on: Feb 11, 2015 * Author: sunyj */ #include "../apuesunyj.h" int main(int argc, char...
分类:
其他好文 时间:
2015-03-07 19:56:34
阅读次数:
230
本菜刚刚学习UNIX下高级编程,无奈搭建本书编程环境时遇到不少问题。幸好网上有各种大神的解决办法让我最终解决了问题。在这里感谢为LINUX开源操作系统奋斗的大神。不过话说回来,网上大都是针对UNIX高级编程第二版的头文件搭建,现在对于第三版来说,有些过时,因为很对针对linux的make文件已经改变...
分类:
系统相关 时间:
2015-02-28 12:47:35
阅读次数:
165
看书的时候发现这个习题没有答案,于是就想把自己做的结果贴上来,和大家分享分享! 首先把题目贴上来吧:/*********** 8.10节中提及POSIX.1要求在调用exec时关闭打开的目录流。按下列方法对此进行验证,对根目录调用opendir,查看在你的系统上实现的DIR结构,然后打印执行...
分类:
其他好文 时间:
2015-02-22 21:53:19
阅读次数:
159
这一章主要是要解决这么几个问题:当执行程序时,main函数是如何被调用的?main函数的原型是:int main(int argc, char *argv[]);其中argc是命令个数,argv则是字符指针,指向字符串(命令)。当内核执行一个C程序的时候,是由一个特别的起始例程(exex函数族的一个...
分类:
其他好文 时间:
2015-02-11 14:21:24
阅读次数:
255
使用信号捕抓ctrl + c信号/* * 1.10ReadCommandsFromStandardInputAndExecuteThem.cpp * * Created on: Feb 11, 2015 * Author: sunyj */ #include "../apuesunyj.h"
#in...
分类:
其他好文 时间:
2015-02-11 14:14:58
阅读次数:
139
/* * 1.8DemonstrateStrerrorAndPerror.cpp * * Created on: Feb 11, 2015 * Author: sunyj */ #include "../apuesunyj.h" int main(int argc, char *argv[])
{ ...
分类:
其他好文 时间:
2015-02-11 12:42:32
阅读次数:
112
// apuesunyj.h
#ifndef APUE_SUNYJ
#define APUE_SUNYJ #include #include #include #include #include #include #include int64_t const MAXLINE = 4096; // m...
分类:
其他好文 时间:
2015-02-11 12:12:20
阅读次数:
174
1 /* 2 * 1.6PrintTheProcessID.cpp 3 * 4 * Created on: Feb 11, 2015 5 * Author: sunyj 6 */ 7 8 #include "../apuesunyj.h" 9 10 int main(voi...
分类:
其他好文 时间:
2015-02-11 09:14:44
阅读次数:
122
1 /* 2 * 1.5CopyStandardInputToStandardOutputUsingStandardIO.cpp 3 * 4 * Created on: Feb 10, 2015 5 * Author: sunyj 6 */ 7 8 #include ".....
分类:
其他好文 时间:
2015-02-10 21:27:50
阅读次数:
427