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
Ïà¹ØÎĵµ£º
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ϵĴÅÅÌË鯬ÕûÀí
ÍøÉÏÓÐЩÌû×Ó˵XFS²»ÓÃ×öË鯬ÕûÀí£¬ÆäʵÊÇ´íÎóµÄ¡£XFSÓÃÑÓ³ÙдÈëµÈ¼¼Êõȷʵ¿ÉÒÔ¼õÉÙË鯬µÄ³öÏÖ£¬µ«ÊÇÈç¹û·þÎñÆ÷ÓÃÁ˼¸Ä꣬²¢ÇÒÎļþ²Ù×÷±È½ÏƵ·±£¬»¹ÊÇ»á³öÏÖË鯬µÄ£¬Ó¦¸ÃÕûÀí¡£×¢Ò⣺ÔÚDebianÖÐXFSÏà¹ØÃüÁîÔÚxfsprogs°üÖУ¬¶øxfs_fsrÃüÁîÊÇÔÚxfsdump°üÖеġ£ËùÒÔÒªÓÃxfs_fsrÕûÀíË鯬£¬¼ÇµÃ°²×°xfsdu ......
ÔÚ¿ØÖÆÌ¨Ï£¬ÓÃls£¬¾Í»á·¢ÏÖ£¬shell½«²»Í¬ÀàÐ͵ÄÎļþÏîÄ¿ÏÔʾΪ²»Í¬µÄÑÕÉ«¡£Õß¿ÉÒÔÌá¸ßЧÂÊ£¬²»ÓÃls -l±ãÄÜ´ó¸ÅµÄ°Ñ¸÷¸öÎļþµÄÀàÐÍÇé¿öÁ˽âһϡ£
ÄãÓÐûÓÐÏë¹ý¸ü¸ÄÕâ¸ö×ÅÉ«ÅäÖÃÄØ£¿
Æä
ʵ£¬ÔÚ/etcÏÂÓÐÒ»¸öDIR_COLORSµÄÎļþ£¬ÕâÊÇÒ»¸ö×ÅÉ«¿ØÖƵÄÄ£°æ¡£ÏÖ½«Õâ¸öÄ£°æ¿½³öÀ´¡£Èç¹ûÏëÈÃÕâ¸öÅäÖÃÔÚrootÓû§ÏÂÉúЧ£¬±ß¿½µ½
......
SUSE Linux ά»¤±Ê¼Ç Ò»
1. Linuxʱ¼ä¸üÐÂÉèÖÃ
Ê±ÇøÉ趨:
#Ö÷ÒªÎļþ
/etc/sysconfig/clock
#Óñ±¾©Ê±¼äµÄÕýÈ·ÄÚÈÝÓ¦¸ÃÊÇ
TIMEZONE="Asia/Beijing"
DEFAULT_TIMEZONE="Asia/Beijing"
#ͬʱȷ±£ /etc/localtimeÎļþÊÇ/usr/share/zoneinfo/Asia/BeijingµÄ¿½±´
±£³Ö¸üÐÂ:
ÔÚ/etc/crontabÖмÓÈëÒ» ......
2009 Äê 10 ÔÂ 29 ÈÕ
±¾ÎÄÊÇ Unix/Linux ϵͳ¹ÜÀí×Ô¶¯»¯ÏµÁÐÖеÄһƪÎÄÕ£¬Ö÷Òª½éÉÜÁËÄÚ´æ¹ÜÀíËùÉæ¼°µÄÃüÁ²¢Í¨¹ý±àд×Ô¶¯»¯½Å±¾ÊµÏÖÁËÄÚ´æ¹ÜÀíÓë¼à¿ØµÄ×Ô¶¯»¯
ÄÚ´æÊÇ Unix/Linux ÄÚºËËù¹ÜÀíµÄ×îÎªÖØÒªµÄ×ÊÔ´Ö®Ò»£¬ÄÚ´æ¹ÜÀíÊÇϵͳ¹ÜÀíÖзdz£ÖØÒªÒ²ÊÇ×ÔӵĵIJ¿·Ö¡£ÏµÍ³¹ÜÀíÔ±ÐèÒªÕÆÎÕÄÚ´æ¹ÜÀíµÄ»ù±¾¹¤×÷ÔÀíÒÔ¼°Ê¹Óú ......