易截截图软件、单文件、免安装、纯绿色、仅160KB

查看linux 错误码的程序

为了方便查看Linux系统下的错误码以及它的含义,写了一个程序来打印这些信息。
listerrno.c
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#define MAX_ERRNO 256
int main(int argc, char* argv[])
{
int n = 0;
printf("----------------------- Errno --------------------\n");
for(n=0; n < MAX_ERRNO; n++)
{
printf("#%d, %s\n", n, strerror(n));
}
printf("--------------------------------------------------\n");
return 0;
}
Makefile:
E_TARGET = listerrno
all: $(E_TARGET)
listerrno:
gcc -o $@ listerrno.c
clean:
rm -rf $(E_TARGET) *.o
在Redhat Enterprise Linux 5 上的打印结果:
----------------------- Errno --------------------
#0, Success
#1, Operation not permitted
#2, No such file or directory
#3, No such process
#4, Interrupted system call
#5, Input/output error
#6, No such device or address
#7, Argument list too long
#8, Exec format error
#9, Bad file descriptor
#10, No child processes
#11, Resource temporarily unavailable
#12, Cannot allocate memory
#13, Permission denied
#14, Bad address
#15, Block device required
#16, Device or resource busy
#17, File exists
#18, Invalid cross-device link
#19, No such device
#20, Not a directory
#21, Is a directory
#22, Invalid argument
#23, Too many open files in system
#24, Too many open files
#25, Inappropriate ioctl for device
#26, Text file busy
#27, File too large
#28, No space left on device
#29, Illegal seek
#30, Read-only file system
#31, Too many links
#32, Broken pipe
#33, Numerical argument out of domain
#34, Numerical result out of range
#35, Resource deadlock avoided
#36, File name too long
#37, No locks available
#38, Function not implemented
#39, Directory not empty
#40, Too many levels of symbolic links
#41, Unknown error 41
#42, No message of desired type
#43, Identifier removed
#44, Channel number out of range
#45, Level 2 not synchronized
#46, Level 3 halted
#47, Level 3 reset


相关文档:

实战Linux Bluetooth编程 (七) SDP协议

Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......

实现Linux系统调用劫持

关于系统调用劫持
如果一个木马要隐藏起来,不被系统管理员发现。截获系统调用似乎是必须的。大部分情况下,通过修改系统调用表来实现系统调用的劫持。下面是一个典型的截获系统调用的模块:
模块一:
#include
#include
#include
#include
#include
#include
#include
#include
#include
MODULE_LICE ......

[转]如何实现Windows远程连接Linux操作系统

 
准备好两台已经上网的电脑。
 
1、设置等会要连接到的Linux系统
 
(1)必须是安装了telnet软件的系统,其中该软件分为两部分,分别是telnet-client和telnet-server,其中前者默认已经装好,而后者则需自己进行安装。在这里,笔者自己的是RedHat的FC6系统,所以可以输入命令yum install telnet-serve ......

学习linux多线程编程 相关概念

学习Linux多进程编程
一、进程的定义:程序执行和资源管理的最小单位。
二、进程控制:
(1)进程标识: 进程标识  子进程号  父进程号
 头文件  #include<unistd.h>  #include<unistd.h>
 函数功能  取得当前进程的进程号  取得当前进程的父进程号
 函 ......

linux命令行(一)

小技巧,对于linux老鸟来说不止一提,但是对于我这种新手还有很有帮助的。
1. 命令行的别名:
    sudo gedit ~/.bashrc
在打开的文件中使用:alias  简写命令=“要替换的命令”
如:alias l=“ls -l”
       alias install=“sudo apt- ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号