Begining Linux Programing Chapter 3
来源:互联网 发布:闲鱼卖家如何淘宝介入 编辑:程序博客网 时间:2024/05/19 04:02
/dev/console
Error messages and diagnostics are often sent to this device.
/dev/tty
It is an alias for the controlling terminal of a process.
/dev/null
All output written to this device is discarded.
Library Functions:
The library functions arrange for the low-level system calls .
Permission:
The mode value given in the open call is ANDed with the inverse of the user mask value at runtime.
ioctl:
It provides an interface for controlling the behavior of devices and their descriptors and configuring underlying services.
The standard I/O library:
The equivalent of the low-level file descriptor is called a stream is implemnted as a pointer to a structure, a FILE *.
Three file streams are automatically opened when a program is strarted.They are stdin,stdout,stderr.
fclose:
To close the specified stream,causing any unwritten data to be fgwritten.When a program ends normally,fclose is called automatically on all file streams that are still open.
fflush:
causing all outstanding data on a file stream to be written immediately. f
fgets:
read a string from an input file stream.
Streams Error:
The ferror function tests the error indicator for a stream and returns nonzero if it's set,but zero otherwise.
The feof function tests the end-of-file indicator within a stream and returns nonzero if it is set,zero otherwise.
The clearerr function clears the end-of-file and error indicators for the stream to which stream points.
Error:
strerror,maps an error number into a string describing the type of error that has occurred.
perror,report in errno,into a string and prints it on the standard error stream.
- Begining Linux Programing Chapter 3
- Begining Linux Programing Chapter 1,2
- begining...
- Begining
- Begining
- Begining
- begining
- Begining
- Begining
- Begining
- Begining
- The C programing language chapter 6 : struct
- Linux Programing -- ch8 -- MySQL
- linux socket programing
- 3D Programing weekly
- The linux module programing guide
- SHELL programing study in linux
- Linux Programing -- ch12-- POSIX 线程
- Objectivt-c文件后缀
- 查缺补漏
- 关于org.hibernate.hql.ast.QuerySyntaxException: 关键字命名的类 is not mapped [from 关键字命名的类 ]
- OpenSessionInView会不会影响性能?
- fatal error C1189:
- Begining Linux Programing Chapter 3
- C语言头文件的使用
- 机房收费系统报表的使用
- VMware Tools installation cannot be started manually while Easy Install is in progress
- 一个程序猿眼中的国内主流地图api
- 使用js对JSON进行解析
- java中的this关键字
- 笔试题1:C/C++ 笔试、面试题目大汇总
- 冯仑谈中国式创业:忌到钱就止步