Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux daemon() Ó÷¨

Ãû³Æ
      daemon-ÔËÐÐÓÚºǫ́
¸ÅÒª
      #include <unistd.h>
      int daemon(int nochdir, int noclose);
ÃèÊö
      daemon()º¯Êý£¬Ö÷ÒªÓÃÓÚijЩ³ÌÐòÏ£Íû×Ô¼ºÍÑÀëÖն˵ĿØÖƶøÔËÐÐÓÚºǫ́µÄÇé¿ö¡£
      ³ý·Ç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±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

LINUXÏÂmysql¿Í»§¶Ë²»ÄÜÊäÈëÖÐÎÄ

LINUXÏ mysql¿Í»§¶Ë²»ÄÜÊäÈëÖÐÎÄ
½ñÌìÓöµ½ÁËÕâ¸öÎÊÌ⣬ÔÚLINUXÏÂÊäÈëÖÐÎÄ£¬Ã»ÓÐÎÊÌ⣬µ«ÔÚMYSQL¿Í»§¶ËÉÏÎÞ·¨ÊäÈëÖÐÎÄ£¬ºÜÆæ¹Ö£¿
ÕÒÁ˺ܶà×ÊÁÏÖÕÓÚ½â¾öÁËÕâ¸öÎÊÌ⣬ÆäʵÕâ¸öºÍ×Ö·û¼¯Î޹ء£Í¨³£³öÏÖÔÚ×Ô¼º±àÒëµÄmysql°æ±¾ÉÏ£¬Èç¹ûÊÇREDHATµÄ»°£¬ÇëʹÓÃϵͳ×Ô´øMYSQL¿Í»§¶Ë¡£ÏµÍ³Ä¬ÈÏrpm°²×°µÄmysqlÔòûÓÐÕâ¸öÎÊÌâ³öÏÖ¡£
Á ......

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

ΪlinuxÄں˹¹½¨×îСµÄ¸ùÎļþϵͳ Ò»²½Ò»²½¾«¼ò

linuxÄÚºËinit½ø³Ìº¯ÊýµÄ²¿·Ö´úÂëÈçÏ£º 01 if (execute_command)
02 run_init_process(execute_command);
03
04 run_init_process("/sbin/init");
05 run_init_process("/etc/init");
06 run_init_process("/bin/init");
07 run_init_process("/ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ