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

linux daemon() 用法

名称
      daemon-运行于后台
概要
      #include <unistd.h>
      int daemon(int nochdir, int noclose);
描述
      daemon()函数,主要用于某些程序希望自己脱离终端的控制而运行于后台的情况。
      除非nochdir为非零值,如果nochdir为0,那么daemon会从当前目录,更改到根目录(“/”)下运行。
      除非noclose为非零值,如果noclose为0,那么daemon会将标准输入,标准输出,标准错误输出重定向到/dev/null。
返回值
      成功返回0,失败返回-1。
NAME
       daemon - run in the background
SYNOPSIS
       #include <unistd.h>
       int daemon(int nochdir, int noclose);
DESCRIPTION
       The  daemon()  function  is for programs wishing to detach themselves
       from the controlling terminal and run in  the  background  as  system
       daemons.
       Unless the argument nochdir is non-zero, daemon() changes the current
       working directory to the root ("/").
       Unless the argument noclose is non-zero, daemon() will redirect stan-
       dard input, standard output and standard error to /dev/null.
RETURN VALUE
       (This  function  forks,  and  if the fork() succeeds, the parent does
       _exit(0), so that further errors are seen by  the  child  only.)   On
       success  zero will be returned.  If an error occurs, daemon() returns
     &nb


相关文档:

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

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

Linux设备模型之input子系统详解

一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......

linux mount用法

mount [-t vfstype] [-o options] device dir
  其中:
  1.-t vfstype 指定文件系统的类型,通常不必指定。mount 会自动选择正确的类型。常用类型有:
  光盘或光盘镜像:iso9660
  DOS fat16文件系统:msdos
  Windows 9x fat32文件系统:vfat
  Windows NT ntfs文件系统:ntfs
  Mount Windows文件 ......

building firefox 【linux】

  
sudo apt-get build-dep firefox
若出现下面的错误:
不能满足软件包 firefox 所要求的构建依赖关系
请将 /etc/apt/sources.list 改为默认的源 有就是 装完系统后自带的:
#deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090421.3)]/ jaunty main restricted
# See http://help.ubuntu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号