nohupÃüÁîÓ÷¨¼ò½é
nohup
Èç¹ûÄãÕýÔÚÔËÐÐÒ»¸ö½ø³Ì£¬¶øÇÒÄã¾õµÃÔÚÍ˳öÕÊ»§Ê±¸Ã½ø³Ì»¹²»»á½áÊø£¬ÄÇô¿ÉÒÔʹÓÃn o h u pÃüÁî¡£¸ÃÃüÁî¿ÉÒÔÔÚÄãÍ˳öÕÊ»§Ö®ºó¼ÌÐøÔËÐÐÏàÓ¦µÄ½ø³Ì¡£n o h u p¾ÍÊDz»¹ÒÆðµÄÒâ˼( no hang up)¡£
¸ÃÃüÁîµÄÒ»°ãÐÎʽΪ£º
´úÂë:
nohup command &
ʹÓÃnohupÃüÁîÌá½»×÷Òµ
Èç¹ûʹÓÃn o h u pÃüÁîÌá½»×÷Òµ£¬ÄÇôÔÚȱʡÇé¿öϸÃ×÷ÒµµÄËùÓÐÊä³ö¶¼±»Öض¨Ïòµ½Ò»¸öÃûΪn o h u p . o u tµÄÎļþÖУ¬³ý·ÇÁíÍâÖ¸¶¨ÁËÊä³öÎļþ£º
´úÂë:
nohup command > myout.file 2>&1
ÔÚÉÏÃæµÄÀý×ÓÖУ¬Êä³ö±»Öض¨Ïòµ½m y o u t . f i l eÎļþÖС£
ÈÃÎÒÃÇÀ´¿´Ò»¸öÀý×Ó£¬ÑéÖ¤Ò»ÏÂÔÚÍ˳öÕÊ»§ºóÏàÓ¦µÄ×÷ÒµÊÇ·ñÄܹ»¼ÌÐøÔËÐС£ÎÒÃÇÏÈÌá½»Ò»¸öÃûΪp s 1µÄÈÕÖ¾Çå³ý½ø³Ì£º
´úÂë:
$nobup ps1 &
ÏÖÔÚÍ˳ö¸Ãs h e l l£¬ÔÙÖØеǼ£¬È»ºóÖ´ÐÐÏÂÃæµÄÃüÁ
´úÂë:
$ps x |grep ps1
ÎÒÃÇ¿´µ½£¬¸Ã½Å±¾»¹ÔÚÔËÐС£Èç¹ûϵͳ²»Ö§³Öps xÃüÁʹÓÃps -ef|grep ps1ÃüÁî¡£
5.Ò»´ÎÌá½»¼¸¸ö×÷Òµ
Èç¹ûÏ£ÍûÒ»´ÎÌá½»¼¸¸öÃüÁ×îºÃÄܹ»°ÑËüÃÇдÈëµ½Ò»¸ös h e l l½Å±¾ÎļþÖУ¬²¢ÓÃn o h u pÃüÁîÀ´Ö´ÐÐËü¡£
ÀýÈ磬ÏÂÃæµÄËùÓÐÃüÁÓùܵÀ·ûºÅÁ¬½ÓÔÚÒ»Æð£»ÎÒÃÇ¿ÉÒÔ°Ñ ......
ÔÚQTÖпÉÒÔÖ±½ÓʹÓÃQTextCodecÀ´×ª»»×Ö·û´®µÄ±àÂë¡£
ÀýÈ磬ÎÒÃÇÏëÔÚ³ÌÐòÖÐʹÓÃÖÐÎÄ£¬ÀàËÆtr£¨“飬ÄãºÃÂ𣿔£©¡£ÎÒÃÇÒªÔÚmainº¯ÊýÖÐÔö¼ÓÒÔϼ¸ÌõÓï¾ä£¬ÖØÐÂÉèÖÃÒ»ÏÂĬÈϵıàÂëÆ÷¡£
Ïȵ÷ÓÃÏÂÃæÁ½¸öº¯ÊýÖ®Ò»
QTextCodec *codec=QTextCodec::codecForName(”gbk”);
QTextCodec *codec=QTextCodec::codecForName(”utf8″);
È»ºóµ÷ÓÃÏÂÃæÈý¸öº¯ÊýÖ®Ò»
QTextCodec::setCodecForCStrings(codec);
//Õâ¸öº¯ÊýÖ÷ÒªÊÇÓÃÔÚ×Ö·û³£Á¿»òÕßQByteArray¹¹ÔìQString¶ÔÏóʱʹÓõÄÒ»ÖÖ±àÂ뷽ʽ¡£
QTextCodec::setCodecForTr(codec);
//Õâ¸öº¯ÊýµÄ×÷ÓÃÊÇÉèÖô«¸øtrº¯ÊýʱµÄĬÈÏ×Ö·û´®±àÂ룬GUIÉè¼ÆÖÐ×î³£ÓõÄÒ»ÖÖ¡£
QTextCodec::setCodecForLocale(codec);
//Õâ¸öº¯ÊýÖ÷ÒªÓÃÓÚÉèÖúͶԱ¾µØÎļþϵͳ¶ÁдʱºòµÄĬÈϱàÂë¸ñʽ¡£±ÈÈçͨ¹ýÁ÷¶ÁÈ¡Ò»¸öÎļþÄÚÈÝʱµÄ±àÂë¸ñʽ¡£»òÕßͨ¹ýqDebug£¨£©Êä³ö´òÓ¡ÐÅϢʱµÄ±àÂë¡£
ʾÀýÈçÏ£º
ÔÚºìñ×ÓÆóÒµ°ælinux5ÉÏÔËÐÐQtCreator±àдÈçϳÌÐò
#include <QApplication>
#include <QTextCodec>
#include <QWidget>
#include <QLabel>
int main(int argc, char *argv[])
{
  ......
À´×Ô http://blog.csdn.net/saintony/category/226987.aspx
¼ÆËã»ú×î´óµÄÊг¡ÊÇǶÈëʽÉ豸¡£»ù±¾ÉÏ£¬º¬ÓмÆËã»úµ«ÊÇÍâ±í²¢²»Ïó¼ÆËã»úµÄÒ»ÇÐÉ豸¶¼¿ÉËãǶÈëʽ£¬°üÀ¨ÍøÂçÉ豸£¨Èç·ÓÉÆ÷£©£¬¹¤¿ØÉ豸£¨ÈçÊý¿Ø»ú´²£©£¬Æû³µ£¬ÐÅÏ¢¼Òµç, Òƶ¯¼ÆËãÉ豸µÈ¸÷ÖÖÉ豸¡£ÄÇô£¬ÔÚÕâ¸ö×î´óµÄÊг¡ÖУ¬LinuxºÍWindows˸üÓÐʵÓÃÐÔÄØ£¿ÈÃÎÒÃÇÏÈ·ÖÎöÒ»ÏÂǶÈëʽÁìÓò¶ÔOSµÄÒªÇó¡£
ǶÈëʽÁìÓòÓëPCÁìÓòÓкܴóµÄ²»Í¬£¬Ç¶Èëʽϵͳ¶¼ÊÇÕë¶Ô¾ßÌåÓ¦ÓõÄרÓÃϵͳ£¬ÆäÈíÓ²¼þÐèÒªÃæÏòÓ¦ÓÃÀ´Éè¼Æ£¬²¢ÇÒÓÉÓÚǶÈëÊÐϵͳÁìÓò¼«Æä¹ã·º£¬²»Í¬ÁìÓòËù²ÉÓõļ¼Êõ¸÷²»Ïàͬ£¬ËùÒÔ³¤ÆÚÒÔÀ´£¬Ç¶ÈëʽÁìÓòһֱûÓÐÐγÉPCºÍServerÁìÓòµÄ±ê×¼»¯ºÍ¢¶ÏÐÔ£¬Intel£¬Microsoft¶¼²»ÊÇ°ÔÖ÷£¬½ö³£ÓõÄCPU¾ÍÓÐÊýÊ®ÖÖÖ®¶à£¬³£¼ûµÄÓÐArm£¬MIPS£¬PowerPCµÈϵÁÐоƬ£¬Ç¶Èëʽ²Ù×÷ϵͳҲÓÐÊýÊ®ÖÖ£¬Vxworks£¬QNX£¬Symbian£¬PSOS£¬Linux£¬WinCEµÈµÈ¡£
¹é½áÆðÀ´£¬Ç¶ÈëʽÉ豸ÓÐÈçÏÂÌص㣺
1.³É±¾Ãô¸Ð£¬×ÊÔ´ÓÐÏÞ¶àÊýǶÈëʽϵͳ¾ßÓгɱ¾Ãô¸ÐÐÔ£¬ËüµÄÓ²¼þºÍÈí¼þ¶¼±ØÐë¸ßЧÂʵØÉè¼Æ£¬Á¿Ìå²ÃÒ¡¢È¥³ýÈßÓà¡£ºÃµÄǶÈëʽϵͳÊÇÍê³ÉÄ¿±ê¹¦ÄܵÄ×îСϵͳ£¬ÕâÑùµÄ²úÆ·²Å¸ü¾ßÓоºÕùÁ¦¡£ËùÒÔ£¬¶àÊýǶÈëʽϵͳÖеÄÓ²¼þ×ÊÔ´ÊǺÜÓÐÏ޵ģ¬Èç´ ......
¡¡¡¡ÕâÊǹØÓÚÈçºÎÓø÷ÖÖ¿ÉÒԵõ½µÄ½Ó¿ÚΪLinux¿ª·¢ÍøÂç³ÌÐòµÄϵÁÐÎÄÕµĵÚһƪ¡£¾ÍÏñ´ó¶àÊýUnix-basedµÄ²Ù×÷ϵͳһÑù£¬LinuxÖ§³Ö½«TCP/IP×÷Ϊ±¾µØµÄÍøÂç´«ÊäÐÒé¡£ÔÚÕâ¸öϵÁÐÖУ¬ÎÒÃǼٶ¨ÄãÒѾ±È½ÏÊìϤLinuxÉϵÄC±à³ÌºÍLinuxµÄһЩϵͳ֪ʶÖîÈçsignals,forkingµÈµÈ¡£
¡¡¡¡ÕâƪÎÄÕÂÊǹØÓÚÈçºÎÓÃBSDÌ×½Ó¿Ú´´½¨ÍøÂç³ÌÐòµÄ»ù´¡½éÉÜ ¡£ÔÚÏÂһƪÖУ¬ÎÒÃÇ»á½â¾öÉæ¼°µ½½¨Á¢(ÍøÂç)deamon½ø³ÌµÄÎÊÌâ¡£¶øÇÒ½ñºóµÄÎÄÕÂÎÒÃÇ»¹»áÉæ¼°µ½Ê¹ÓÃÔ¶³Ì¹ý³Ìµ÷ÓÃ(RPC)£¬ÒÔ¼°ÓÃCORBA/distributed objects½øÐпª·¢¡£
¡¡¡¡Ò»¡¢TCP/IPµÄ»ù´¡½éÉÜ
¡¡¡¡TCP/IPÐÒé×åÔÊÐíÁ½¸öÔËÐÐÔÚͬһ̨µçÄÔ»òÕßÓÉÍøÂçÁ¬½ÓÔÚÒ»ÆðµÄÁ½Ì¨µçÄÔÉϵijÌÐò½øÐÐͨѶ¡£Õâ¸öÐÒé×åÊÇרÃÅΪÁËÔÚ²»¿É¿¿µÄÍøÂçÉϽøÐÐͨѶÉè¼ÆµÄ¡£TCP/IPÔÊÐíÁ½¸ö»ù±¾µÄ²Ù×÷ģʽ——ÃæÏòÁ¬½ÓµÄ¿É¿¿µÄ´«Êä(Ö¸TCP)ºÍÎÞÁ¬½ÓµÄ(connectionless)²»¿É¿¿µÄ´«Êä(UDP)¡£
¡¡¡¡TCPÌṩ´øÓжÔÉϲãÐÒé͸Ã÷µÄÖм̹¦Äܵģ¬Ë³ÐòµÄ£¬¿É¿¿µÄ£¬Ë«ÏòµÄ(bi-directional),ÒÔÁ¬½ÓΪ»ù´¡µÄ×Ö½Ú´«ÊäÁ÷¡£TCP½«ÄãµÄÐÅÏ¢·Ö¸î³ÉÊý¾Ý±¨(²»´óÓÚ64kb)²¢±£Ö¤ËùÓеÄÊý¾Ý±¨ÎÞÎóµÄ°´ÕÕ˳Ðò¶¼µ½´ïÄ¿µÄµØ¡£ÓÉÓÚÒÔÁ¬½ÓΪ»ù´¡£¬ËùÒÔÒ»¸öÐéÄâÁ¬½Ó±ØÐëÔÚÒ»¸öÍøÂçÊµÌ ......
ÕªÒª:ÊÓƵͼÏñ²É¼¯¼°´¦Àí¼¼ÊõÔÚÔ¶³ÌÊÓƵ¼à¿ØºÍ¿ÉÊӵ绰ÖÐÓÐ׏㷺µÄÓ¦ÓÃÇ°¾°£¬Çý¶¯ÊÓƵ²É¼¯É豸ºÍ»ñÈ¡ÊÓƵÊý¾Ý²¢½øÐÐÏàÓ¦µÄ´¦Àí£¬ÊÇʵÏÖÕâЩӦÓõĻù´¡¡£Õë¶ÔÕâЩӦÓ㬹¹½¨ÁËÒ»¸ö»ùÓÚǶÈëʽ LinuxºÍ PXA270΢´¦ÀíÆ÷µÄÊÓƵ²É¼¯Óë´«Êäϵͳ£¬ÀûÓà Video4LinuxʵÏÖ USBÉãÏñÍ·ÊÓƵÊý¾Ý²É¼¯£¬²É¼¯µÄÊÓƵÊý¾Ý¾ JPEGѹËõºó£¬ÔÚ PXA270ΪºËÐĵÄϵͳ¿ØÖÆÏÂͨ¹ýÒÔÌ«Íø½øÐд«Ê䣬²¢Í¨¹ýÖØбàÒëÒÆÖ² Webcam_serverÓ¦ÓóÌÐòʵÏÖÁËʵʱÊÓƵ²É¼¯¡£ÊµÑé½á¹û±íÃ÷£¬¸Ãϵͳ¶¯Ì¬Ë¢ÐÂÁ¼ºÃ£¬¾ßÓÐÒ»¶¨µÄʵÓÃÐÔ¡£
¹Ø¼ü´Ê: PXA270£»Ç¶Èëʽ Linux£»USBÉãÏñÍ·£»Í¼Ïñ²É¼¯Óë´«Êä
Abstract:Video image acquisition and processing technology had a broad application prospect in the long distance supervisory control with video and video telephone. Driving video acquisition equipments and gaining video data to process accordingly are the basis of realization the applications. Aiming at the applications, designed a video acquisition and transmission system based on PXA270 with embedded Linux. The system used USB camera combined with Video4Linux to implement ......
Socket ¾ÍÊÇÌ×½Ó×Ö¡£
Socket ¿ÉÒԺͱ¾µØĿ¼°ó¶¨£¬Ò²¿ÉÒÔºÍÒ»¸öIPµØÖ·°ó¶¨¡£
int socketpair(sa_family, socket_type, protocal, int sz[2]);
sa_family: AF_LOCAL( ºÍ AF_UNIXÒ»Ñù) ±íʾ±¾µØµÄsocket Á¬½Ó
AF_INET ±íʾInternet µÄsocket Á¬½Ó
ÉÏÊöº¯Êý´´½¨ÁËÒ»¶Ôsocket £¬·Ö±ð·ÅÔÚ sz[0], sz[1] ÀïÃ棬ÕâÁ½¸ö¶¼ÊÇsocket µÄ file unit number£¬ ºÍ´ò¿ªÎļþÊÇÒ»ÑùµÄ¡£ ......