易截截图软件、单文件、免安装、纯绿色、仅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编程(六) L2CAP编程实例

例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
 如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......

linux下多线程 之 pthread_detach(pthread_self())

正式实习一周,有点感触。本来就没指望能成为什么技术大牛,用自己调侃的话来说就是“混口饭吃”。不过老大对me的期望值那么高,经理管得这么严,压力颇大。对自己挺失望,没能开好头,有点对不起这么成功的老大。还好没准备做什么大事,要不然这性格得费多大力气才能重塑。。。
都是逼出来的,被经理训后,一天 ......

linux常用命令及经典用法

      我就是一个小新手+小菜鸟,正在发奋学习linux,初有心得遂决定记录下来,也许对有些人来说我写的都太浅显,但是对初学者来说绝对是有用的,可以让你少走很多弯路,况且我会由浅入深的,沿着我的足迹一起学习吧,加油!
      本来想先写系统安装,然后环境配置, ......

更改linux目录的默认颜色(我选择了Yellow)

在控制台下,用ls,就会发现,shell将不同类型的文件项目显示为不同的颜色。者可以提高效率,不用ls -l便能大概的把各个文件的类型情况了解一下。
你有没有想过更改这个着色配置呢?

实,在/etc下有一个DIR_COLORS的文件,这是一个着色控制的模版。现将这个模版拷出来。如果想让这个配置在root用户下生效,边拷到
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号