Linux 下的错误 error.h
errno
是个int变量,返回错误
有错误时使用方法
fprintf(fp, "%s", strerror(errno))
perror用法
#include <stdio.h>
#include <stdlib.h>
#include<errno.h>
int main(void)
{
FILE *fp;
if((fp=fopen("aaa.txt","r+"))==NULL)
{
puts("不能进入文件");
perror("原因");
printf("errno=%d\n",errno);
exit(1);
}
system("PAUSE");
return 0;
}
fopen返回NULL因为没有文件
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES &
相关文档:
1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI) 就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......
发布: 2009-3-30 14:11 | 作者: gyl4802959
| 来源: IT运维专家网
1)预备知识
Nagios自己定义了一套规则用于配置文件,其中最重要的概念就是”对象”----object.通俗的理解:假定我们首先定义了”性别”这个对象,它
的值只可能是男,女,人妖等等,然后定义某人为一个对象,例如张三,定义张三的时候有 ......
【相关博文转载/网址链接】------------------------
一、linux网络编程----epoll
①linux epoll技术介绍 http://woxihuanpes.blog.163.com/blog/static/12423219820099301048160/[woxihuanpes 的博客]
②epoll http://baike.baidu.com/view/1385104.htm?fr=ala0 [百度百科]
③epoll使用例子:http://blog.csdn.n ......
Linux 下安装QQ
1. download qq:
到QQ官方上下载Linux版本的QQ,有tar.gz和rpm等格式。
建议下载tar.gz格式的。 ......
===============================================================================
= 欢 迎 阅 读 《 V I M 教 程 》 —— 版本 ......