LINUX ½ø³Ì¼ä ÐźÅ
#include <iostream>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <signal.h>
using namespace std;
extern char **environ;
void signal_handle(int signal_no){
cout << "sign:" <<signal_no << endl;
}
int main(int args,char *argc[]){
pid_t pid=fork();
if(pid<0){
cout << "fork error!" <<endl;
}else if(pid==0){
signal(SIGUSR1,signal_handle_kill);
int count=0;
while(count<10){
count++;
cout << "count:" <<count <<endl;
sleep(1);
}
kill(getppid(),SIGUSR1);
}else{
signal(SIGUSR1,signal_handle);
pause();
}
}
Ïà¹ØÎĵµ£º
4ÔÂ29ÈÕÏûÏ¢£¬ÔÚ¸Õ¸Õ½áÊøµÄ°ÍÈûÂÞÄÇ2010ÊÀ½çÒƶ¯´ó»áÉÏ£¬LinuxÖÇÄܲÙ×÷ϵͳ¼Ò×åÁ½¹ÉÊÆÁ¦ºÏ²¢£¬¼´Ó¢ÌضûµÄMoblinÓëŵ»ùÑǵÄMaemo£¬ºÏ²¢ºóÆôÓÃÐÂÃûMeeGo£¬²¢½»ÓÉLinux»ù½ð»á¹ÜÀí¡£
MeeGoÎÊÊÀÐÂÎÅÒ»³ö¾ÍÈçÃÍ»¢ÏÂɽ£¬Òý·¢Òµ½ç¹ã·º¹Ø×¢ºÍÈÈÒé¡£Ë˵ӢÐÛ²»Îʳö´¦£¿ÏȲ»ÂÛδÀ´ÊÇ·ñÈý·ÖÌì϶øµÃÆäÒ»£¬ÕýÊÇÒòΪÆä³öÉíÏÔ¹ó£¬MeeGo²ÅÎ ......
GCC ÖÐÎÄÊÖ²á
¡¡¡¡http://www.nbfan.com/forum/dispbbs....&ID=1433&page=1
¡¡¡¡GNU make Ö¸ÄÏ
¡¡¡¡http://www.linuxsir.org/bbs/showthr...&threadid=40431
¡¡¡¡autoc ......
linuxĿ¼¼Ü¹¹
/ ¸ùĿ¼
/bin ³£ÓõÄÃüÁî binary file µÄÄ¿錄
/boot ´æ·ÅϵͳÆô¶¯Ê±±ØÐë¶ÁÈ¡µÄµµ°¸£¬°üÀ¨ºËÐÄ (kernel) ÔÚÄÚ
/boot/grub/menu.lst GRUBÉèÖÃ
/boot/vmlinuz ÄÚºË
/boot/initrd ºËÐĽâ壓縮ËùÐè RAM Disk
/dev ϵͳÖܱßÉ豸
/etc ......
1.ÔÚÏßÏÂÔØ£ºwget http://www.realvnc.com/dist/vnc-4.0-x86_linux.tar.gz
2.½âѹËõ£ºtar -zxvf vnc-4.0-x86_linux.tar.gz
¿ÉÒÔ¿´READMEÀïÄÚÈÝÀ´°²×°
3¡£½øÈëvncĿ¼Ï°²×°£º./vncinstall /usr/local/bin
4¡£mkdir -p /usr/local/vnc/classes
cp java/* /usr/local/vnc/classes
5¡£Æô¶¯vncserver
......
Author-------Dansen-----xzd2734@163.com
wait_queue_head_t wait_q;
Ê×ÏÈ¿´¿´
wait_queue_head_tÕâ¸öµÈ´ý¶ÓÁеĽṹ
ÔÚwait.hÖж¨ÒåÁËÕâ¸ö½á¹¹
typedef struct
__wait_queue_head wait_queue_head_t;
struct __wait_queue_head {
wq_lock_t
lock;
struct list_head task_list;
};
# define wq_ ......