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

Linux Daemon Writing HOWTO


This document shows how to write a daemon in Linux using GCC. Knowledge of Linux and a familiarity with C are necessary to use this document. This HOWTO is Copyright by Devin Watson, under the terms of the BSD License.
1. Introduction: What is a Daemon?
2. Getting Started
3. Planning Your Daemon
3.1 What Is It Going To Do?
3.2 How Much Interaction?
4. Basic Daemon Structure
4.1 Forking The Parent Process
4.2 Changing The File Mode Mask (Umask)
4.3 Opening Logs For Writing
4.4 Creating a Unique Session ID (SID)
4.5 Changing The Working Directory
4.6 Closing Standard File Descriptors
5. Writing the Daemon Code
5.1 Initialization
5.2 The Big Loop
6. Putting It All Together
6.1 Complete Sample
1. Introduction: What is a Daemon?
A daemon (or service) is a background process that is designed to run autonomously,with little or not user intervention. The Apache web server http daemon (httpd) is one such example of a daemon. It waits in the background listening on specific ports, and serves up pages or processes scripts, based on the type of request.
Creating a daemon in Linux uses a specific set of rules in a given order. Knowing how they work will help you understand how daemons operate in userland Linux, but can operate with calls to the kernel also. In fact, a few daemons interface with kernel modules that work with hardware devices, such as external controller boards, printers,and PDAs. They are one of the fundamental building blocks in Linux that give it incredible flexibility and power.
Throughout this HOWTO, a very simple daemon will be built in C. As we go along, more code will be added, showing the proper order of execution required to get a daemon up and running.
2. Getting Started
First off, you'll need the following packages installed on your Linux machine to develop daemons, specifically:
GCC 3.2.2 or higher
Linux Development headers and libraries
If your system does not already have these installed (not likely, but che


相关文档:

Linux iptable文档

总览
用iptables -ADC 来指定链的规

,-A添加 -D删除 -C 修改
iptables - [RI] chain rule num rule-specification[option]
用iptables - RI 通过规则的顺序指定
iptables -D chain rule num[option]
删除指定规则
iptables -[LFZ] [chain][option]
用iptables -LFZ 链名 [选项]
iptables -[NX] chain
用 -NX ......

Linux内核增加系统调用

1.linux 系统调用的基本原理
   linux的系统调用形式与POSIX兼容,也是一套C语言函数名的集合。然而,linux系统调用的内部实现方式却与DOC的INT 21H相似,它是经过INT 0X80H软中断进入后,再根据系统调用号分门别类地服务。
从系统分析的角度,linux的系统调用涉及4个方面的问题。
(1)与系统调用有关的 ......

linux下抓图精灵 0.3

由于我的机器偶尔开发用,所以库比较全。
所以如果您安装的时候,缺啥补啥吧~~
careone 打deb包~~
下载页面:http://forum.ubuntu.org.cn/viewtopic.php?f=137&t=217474
下载地址:http://forum.ubuntu.org.cn/download/file.php?id=73080 ......

linux命令的学习笔记

 一、对文件的介绍和操作
      
1)        Linux 系统的文件 和目录 都有三种访问权限分别为:读read(r),write(w),execute(x)
2)        linux 文件用户有三种:文件所有者user,group,其它人others
3)& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号