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
Ïà¹ØÎĵµ£º
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Îļþ ......
ÕýʽʵϰһÖÜ£¬Óеã¸Ð´¥¡£±¾À´¾ÍûָÍûÄܳÉΪʲô¼¼Êõ´óÅ££¬ÓÃ×Ô¼ºµ÷Ù©µÄ»°À´Ëµ¾ÍÊÇ“»ì¿Ú·¹³Ô”¡£²»¹ýÀÏ´ó¶ÔmeµÄÆÚÍûÖµÄÇô¸ß£¬¾Àí¹ÜµÃÕâôÑÏ£¬Ñ¹Á¦ÆÄ´ó¡£¶Ô×Ô¼ºÍ¦Ê§Íû£¬Ã»ÄÜ¿ªºÃÍ·£¬Óеã¶Ô²»ÆðÕâô³É¹¦µÄÀÏ´ó¡£»¹ºÃû׼±¸×öʲô´óÊ£¬Òª²»È»ÕâÐÔ¸ñµÃ·Ñ¶à´óÁ¦Æø²ÅÄÜÖØËÜ¡£¡£¡£
¶¼ÊDZƳöÀ´µÄ£¬±»¾Àíѵºó£¬Ò»Ìì ......
linux¶àÏß³ÌÉè¼Æ
¡¡¡¡1 ÒýÑÔ
¡¡¡¡Ị̈߳¨thread£©¼¼ÊõÔçÔÚ60Äê´ú¾Í±»Ìá³ö£¬µ«ÕæÕýÓ¦ÓöàÏ̵߳½²Ù×÷ϵͳÖÐÈ¥£¬ÊÇÔÚ80Äê´úÖÐÆÚ£¬solarisÊÇÕâ·½ÃæµÄٮٮÕß¡£´«Í³µÄUnixÒ²Ö§³ÖÏ̵߳ĸÅÄµ«ÊÇÔÚÒ»¸ö½ø³Ì£¨process£©ÖÐÖ»ÔÊÐíÓÐÒ»¸öỊ̈߳¬ÕâÑù¶àÏ߳̾ÍÒâζ×Å¶à½ø³Ì¡£ÏÖÔÚ£¬¶àÏ̼߳¼ÊõÒѾ±»Ðí¶à²Ù×÷ϵͳËùÖ§³Ö£¬°üÀ¨Windows/NT£ ......
ÎÒÊÇ KDE Fans¡£ËùÒÔ£¬¿ÉÄÜÒÔÏ»á³öÏַdz£Ö÷¹ÛµÄ¹Ûµã¡£µ«ÊÇ£¬ÎÒ³ÐÈÏÎÒ²»¼«¶Ë~
Linux ϵÄÎÄÕÂÒ»´ó¶Ñ¶¼ÊÇ GNOME ÏÂÄ£·Â Mac£¬µ«ÊÇÔõÑùÄ£·Â¶¼¸Ð¾õ²»Í¬£¬±Ï¾¹²»Í¬¾ÍÊDz»Í¬~
²»È粻ҪһζµØ³ÁË~ ÏàËÆÒ²¿ÉÒÔ°¡~ ÕâÑù¼ÈÓÐÌØÉ«ÓÖÓÐÃÀ¸Ð~
³ýÁË GNOME Ï嵀 Mac4Lin »¹Óкܲ»´íµÄ Elemetary¡£ÕâÁ½¸ö¶¼Êdz£¼ûµÄ GNOME ·Â Mac µÄ ......
ËäÈ»ÎÒÃÇϰ¹ßÓÚlinuxÏÂÃüÁîÐвÙ×÷,µ«Êǰ²×°Ä³Ð©Èí¼þ±ØÐëÊÇ»ùÓÚGUIÏÂÃæµÄ,Õâ¸öʱºò×ܲ»ÄÜÅܵ½»ú·¿È¥°²×°°É,µ«ÎÒÃÇ¿ÉÒÔʹÓÃXmanagerÈí¼þʵÏÖ¶Ôlinux½øÐÐÔ¶³Ì¿ØÖÆ.
µÚÒ»²½£¬ÎÒÃÇÔÚ
LINUX
ϵͳÏ£¬ÐÞ¸Ä
/etc/X11/xdm/Xaccess
Îļþ£¬ÕÒµ½ÏÂÃæÓï¾ä£º
# *# any host can get a login window
È¥µô×îÇ°ÃæµÄ
#
ºÅ ......