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

LinuxÏÂÊØ»¤½ø³ÌµÄ´´½¨Àý×Ó

#include <stdio.h>
#include <signal.h>
#include <ctype.h>
#include <fcntl.h>
int g_count;
void Exit()
{
printf("I will exit, press any key to continue...(g_count = %d)\n", g_count);
exit(0);
}
int main(int argc, char* argv[])
{
struct sigaction almact;
pid_t pid;

// ´´½¨ÊØ»¤½ø³Ì£¬ÈóÌÐòÔÚºǫ́ÔËÐÐ
// fork£¬ÖÕÖ¹¸¸½ø³Ì
if (pid = fork())
exit(0);

// µÚÒ»×Ó½ø³Ì
setsid();
signal(SIGHUP, SIG_IGN);
// fork, ÖÕÖ¹µÚÒ»×Ó½ø³Ì
if (pid = fork())
exit(0);
// Çå³ýÎļþÑÚÂë
umask(0);
signal(SIGTERM, Exit); // killɱµô½ø³Ìʱºò³ÌÐòĬÈÏÖ´Ðк¯ÊýExit



while (1)
{
sleep(1);
g_count ++;
}
}


Ïà¹ØÎĵµ£º

LinuxÄں˼°ARMµÄÄÚ´æ¹ÜÀí

ÓÐÐí¶àÊ£¬ÐèÒª»Øµ½u-boot²ÅÄÜ˵Çå³þ……
include\configs\XXXX.hÖУ¨XXXXÊÓ¾ßÌåÆ½Ì¨¶ø¶¨£©£¬Ò»°ã»á×÷ÀàËÆÈç϶¨Ò壺
#define CONFIG_BOOTCOMMAND "mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000"
±àÒëʱ¸ÃºêCONFIG_BOOTCOMMAND´«µÝ¸øÒ»¸öENVÏîbootcmd£¬¶øÔÚcommon\main.cÖУ¬º¯Êýmain_loopÈ ......

LinuxÉÏÉÕ¼CD

Linux Ϊ´´½¨ CD ÌṩÁ˹¦ÄÜÇ¿´óÇÒÁé»îµÄ¹¤¾ß¡£
Äú¿ÉÒÔ´´½¨ÔÚ¼¸ºõÈÎºÎÆ½Ì¨É϶¼¿É¶ÁµÄÅÌ£¬»¹¿ÉÒÔ´´½¨ .iso ÎļþÒÔ¹©ÏÂÔØºÍ·Ö·¢¡£
ÔÚÈÎºÎÆ½Ì¨ÉÏ´ÓÃüÁîÐÐÉÕ¼ CD ¶¼ÊÇÒ»¼þÁîÈ˷ѽâÇÒ·³ÔêµÄÊÂÇ飬Linux µ±È»Ò²²»ÀýÍâ¡£²»¹ý£¬ÓÉÓÚÔÚ¸÷ƽ̨ÉÏËùÓõ½µÄÃüÁîºÍÊõÓﶼʮ·ÖÏàËÆ£¬Òò´ËѧϰһÏÂÈçºÎÔÚ Linux ÉϿ̼ CD »¹ÊÇÊ®·ÖÓÐÓõġ ......

linux lua

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "include/lua.hpp"
bool g_bQuit = false;
void ......

LinuxÏÂij¸öĿ¼ÏµÄÎļþ°´´óСÅÅÐò

1. df -lh
²é´ÅÅÌʹÓÃÇé¿ö
2. du -s /usr/* | sort -rn
ÕâÊǰ´×Ö½ÚÅÅÐò
3. du -sh /usr/* | sort -rn
ÕâÊǰ´Õ×£¨M£©À´ÅÅÐò
4.Ñ¡³öÅÅÔÚÇ°ÃæµÄ10¸ö
du -s /usr/* | sort -rn | head
5.Ñ¡³öÅÅÔÚºóÃæµÄ10¸ö
du -s /usr/* | sort -rn | tail
˵Ã÷£º/usr/*Ò²¿ÉÒԸijÉÄãÏëµ½´ïµÄÈκÎĿ¼
Èç/usr/local/zhou/r ......

linux ÄãÊÇÎÒµÄÏ£Íû

ÎÒÊÇÒ»¸öƽ·²µÄÈí¼þ¹¤³Ìʦ
һֱϣÍû¹ú²úÈí¼þÄܹ»´ó·ÅÒì²Ê
¿ÉÕýËùνϣÍûÔ½´ó£¬Ê§ÍûÒ²Ô½´ó
Ô½À´Ô½¸Ð¾õµ½ÒªÏë°ÑÈí¼þ×ö´ó×öÇ¿
ʵÔÚÊÇÌ«ÄÑÌ«ÄÑÁË
ÓÞÃÁÈçÎÒÔõôҲ¿´²»µ½¹âÃ÷µÄ´óµÀ
¿ÉÊÇÄѾͲ»×öÁË
¶àÉÙÖÇÕߣ¬×ÜÊÇ¿´×¼ÁËÒ»¸ö·½Ïò£¬¼á³ÖÔÚÒ»¸öСµÄÁìÓò×öϸ×öר×öÇ¿.......
linux¸øÁ˺ܶàÈËÒ»¸öÏ£Íû£¬¿ªÔ´µÄÊÀ½çÈúܶàÈËÈç³Õ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ