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

linuxÏ°´Ï¼üÍ˳öwhileÑ­»·(ÀàËÆÓÚ_kbhit)

#include <stdio.h>
#include <sys/select.h>
#include <termios.h>
#include <unistd.h>
#include <ctype.h>
#define STDIN     0
int main()
{
    struct timeval tv = {0,0};
    struct termios term , termbak;
    char   ch;
    fd_set    fd;
   
    FD_ZERO(&fd);
    FD_SET( STDIN ,&fd);
  tcgetattr(STDIN, &term);
  termbak = term;
    term.c_lflag &= ~(ICANON|ECHO);
    tcsetattr(STDIN, TCSANOW, &term);   
    while(1)
    {
        FD_ZERO(&fd);
        FD_SET( STDIN ,&fd);
        if(   1 == select( STDIN+1,&fd,NULL,NULL,&tv)
             && 1 == read( STDIN , &ch , 1 )
             && 'q' == tolower(ch) )
            break;
        putchar('.');fflush(stdout);
        usleep(100000);
    }
   
    tcsetattr(STDIN,TCSANOW,&termbak);
   
    return 0;
}
תÔØ×Ô£ºhttp://topic.csdn.net/u/20100115/10/7ec685ee-27ef-4b03-b184-ce0a1e728cde.html


Ïà¹ØÎĵµ£º

LInux ÏÂÈçºÎ°²×°ffmpeg

LInux
ÏÂ
ÈçºÎ°²×°ffmpeg
¹Ø¼ü×Ö: linux
ffmpeg


ÖÕÓÚ×°ÉÏÁË£¬°Ñ¹ý³Ì¼Ç¼һÏÂ
Ê×ÏÈÒª°²×°¸÷ÖÖ½âÂëÆ÷
1¡¢lame
lame-3.97.tar.gz
Url£ºhttp://sourceforge.net/project/showfiles.php?group_id=290&package_id=309

°²×°·½·¨ÈçÏ£º
Java´úÂë < type="application/x-shockw ......

linuxÄÚºËÖеÄHlistÓëList_head½á¹¹

List_Head
²Ù×÷ϵͳÄں˾­³£ÐèҪά»¤Êý¾Ý½á¹¹¡£ÄÚºËÓбê×¼µÄÑ­»·Á´±í¡¢Ë«Ïò
Á´±íµÄʵÏÖ¡£ÔÚ
<Linux/list.h>
ÎļþÖж¨ÒåÁËÒ»¸ö
list_head
ÀàÐͼòµ¥½á¹¹£º
struct
list_head {
  

struct list_head *next, *prev;
};
 
ͨÓÃÁ´±íµÄ³£ÓÃÓÃ;Êǽ«Ä³Ò»¸öÊý¾Ý½á¹¹±¾Éí´®³ÉÁ´±í£¬»ò½«Ä³Ð©Á ......

linux¹²ÏíÄÚ´æµÄÃüÁî

¼òµ¥½âÊÍÒ»ÏÂipcsÃüÁîºÍipcrmÃüÁî¡£
È¡µÃipcÐÅÏ¢£º
ipcs [-m|-q|-s]
-m      Êä³öÓйع²ÏíÄÚ´æ(shared memory)µÄÐÅÏ¢
-q      Êä³öÓйØÐÅÏ¢¶ÓÁÐ(message queue)µÄÐÅÏ¢
-s      Êä³öÓйؓÕÚ¶ÏÆ÷&rdqu ......

¹ØÓÚLinux²Ù×÷ϵͳ½ø³Ì²Ù×÷£¨ps£©ÃüÁî¼ò½é

1¡¢ps ½ø³Ì״̬²éѯÃüÁî¡£
¡¡¡¡ÃüÁî¸ñʽ#ps [[Ñ¡Ïî]]
¡¡¡¡³£ÓÃÑ¡Ï
¡¡¡¡¡ñ -a,ÏÔʾËùÓÐÓû§½ø³Ì¡£
¡¡¡¡¡ñ -e,ÏÔʾ½ø³Ì»·¾³±äÁ¿¡£
¡¡¡¡¡ñ -l,¸ø³ö³¤ÁÐ±í¡£
¡¡¡¡¡ñ -r,Ö»ÏÔʾÕýÔÚÔËÐеĽø³Ì¡£
¡¡¡¡¡ñ -S,Ôö¼ÓCPUʱ¼äºÍÒ³Ãæ³ö´í¡£
¡¡¡¡¡ñ -w,°´¿í¸ñʽÏÔʾÊä³ö¡£Ä¬ÈÏÇé¿öÏ£¬Èç¹ûÊä³ö½á¹û²»ÄÜÔÚÒ»ÐÐÀïÏÔʾ£¬½«»áËõ¶Ì½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ