易截截图软件、单文件、免安装、纯绿色、仅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下多线程 之 pthread_detach(pthread_self())

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

firefox 简单 插件编译 【linux】

#ifdef XP_UNIX
/*
* Set up the plugin function table that Netscape will use to
* call us. Netscape needs to know about our version and size
* and have a UniversalProcPointer for every function we
* implement.
*/
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
......

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 ......

Linux仿Mac之Linux KDE Macish


我是 KDE Fans。所以,可能以下会出现非常主观的观点。但是,我承认我不极端~
Linux 下的文章一大堆都是 GNOME 下模仿 Mac,但是怎样模仿都感觉不同,毕竟不同就是不同~
不如不要一味地抄了~ 相似也可以啊~ 这样既有特色又有美感~
除了 GNOME 下的 Mac4Lin 还有很不错的 Elemetary。这两个都是常见的 GNOME 仿 Mac 的 ......

windows使用Xmanager远程桌面控制linux系统


虽然我们习惯于linux下命令行操作,但是安装某些软件必须是基于GUI下面的,这个时候总不能跑到机房去安装吧,但我们可以使用Xmanager软件实现对linux进行远程控制.
 
第一步,我们在
LINUX
系统下,修改
/etc/X11/xdm/Xaccess
文件,找到下面语句:
# *# any host can get a login window
去掉最前面的
#
号 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号