linuxµÄÒì³£²¶»ñ
ÇëÎÊLinuxÏÂʹÓÃg++±àÒëµÄʱºòÔÚMakefileµ±ÖÐÐèÒªÖ¸¶¨Ê²Ã´²ÎÊý²ÅÄÜʹ²¶»ñµ½Òì³££¿
ÄãÊÇÖ¸±àÒëʱµÄ´íÎó£¿
C++ ÓïÑÔÓÐ×Ô¼ºµÄ¹Ø¼ü×ÖÀ´²¶×½³ÌÐòÒì³££º
C/C++ code:
try
]
catch(...)
{
cout << "catch all exception\n";
}
C/C++ code:
// ¸üÕý
try
{
}
catch(...)
{
cout << "catch all exception\n";
}
лл£¬ÎÒÖªµÀtry/catch£¬ÏÖÔÚµÄÎÊÌâÊÇÎÒµÄtryµ±Öз¢ÉúµÄÒì³££¬Ã»ÓÐÔÚcatchµ±Öⶻñµ½¡£ÎÒ²»È·¶¨ÊDz»ÊÇMakefileµ±ÖÐÊÇ·ñÐèÒªÏñVCÒ»ÑùÖ¸¶¨¡°ÔÊÐíÒì³£´¦Àí¡±¡£
²»ÓÃʲô²ÎÊýÀ´Ö¸¶¨¡£
ÎÒÊÇ
try{
}
catch(...){
}
°´Àí˵£¬Ó¦¸ÃËùÓеÄÒì³£¶¼Äܲ¶»ñµ½£¬µ«ÊǾÍûÓⶻñµ½¡£ÔÚWindowsÉϾͿÉÒÔ¡£
È·ÈÏһϲúÉúÒì³£µÄµØ·½¾ÍÊÇÄĶδúÂ룿
ÌùÒ»ÏÂÇé¿ö¿´¿´¡£
C/C++ code:
unsigned int getSigInfo()
{
//ÔÚÕâÀï´ò¿ªÁËÒ»¸ö²»´æÔÚµÄÎļþ£¬ËùÒÔpFile = NULL,µ«ÊÇÒòΪûÓÐ×öÅжÏËùÒÔ
//·¢ÉúÒì³££¬ÕâÔÚWindowsµ±ÖпÉÒÔ²¶»ñµ½¡£
//µ«ÊÇÔÚLinuxÏÂ×ÜÊÇÎÞ·¨²¶»ñµ½
FILE* pFile = fopen("/home/lzq/log/bca_log1/test.cer", "wb");
fwrite("\r\n"
Ïà¹ØÎÊ´ð£º
ÔÏȵÄGCC°æ±¾Îª4.1.2,ÎÒÖØбàÒë°²×°ÁËGCC4.3.2£¬µ«ÊDZàÒëÍê³ÌÐòÔËÐгÌÐòʱ»á³öÏÖversion `GLIBCXX_3.4.9' not found Õâ¸öÎÊÌ⣬ÎÒ²»Ì«Ã÷°×Ôõô»ØÊ£¬Çë¸÷λ´óϺָµãһϡ£
ÊÖ¶¯ÔÙ×°Ò»´Îglibc*_3.4.9
ÕâÊÇÎ ......
linux Ͻø³Ì´´½¨¡£
ʹÓÃvfork() º¯Êý´´½¨ÁË×Ó½ø³Ìºó£¬×Ó½ø³ÌÏÈÐÐÖ´ÐУ¬ÔÚ×Ó½ø³Ìµ÷ÓÃexit»òexec֮ǰ¸¸½ø³Ì´¦ÓÚʲô״̬£¿£¿
²»ÖªµÀ£»Ê×ÏÈδ±ØÊÇ×Ó½ø³ÌÏÈÖ´ÐУ»µÚ2¸¸½ø³ÌÒ²´¦ÓÚÖ´ÐÐ״̬£»ÖÁÓÚ¸¸½ø³Ìµ½µ××öʲô£»¿´´ ......
ÎÒÔÚLINUXÉÏÓÐÁ½¸öÓû§
Ò» root
¶þ myadmin
¡¾myadmin@localhost~¡¿$ dir
Desktop myphp
[myadminlocalhost~]$ cd myphp¡¢DesktopÄܽøÈ¥ÆäËûµÄϵͳĿ¼½ø²»È¥
Ö»ÓÐÕâÁ½¸öĿ¼ ÎÒÏë½øÈëÆäËûµÄÏ ......
while(1)
{
time_t now;
time(&now);
struct tm* pt=localtime(&now);
cout < < "µ±Ç°Ê±¼ä" < < pt->t ......
Ó¦ÓÃϵͳÊÇ°²×°ÔÚ /opt Ŀ¼Ï£¬/opt Ŀ¼ÊÇÊôÓÚ¸ùĿ¼ / ϵġ£ÁíÍâÒ»¸öÎļþϵͳµÄ¹ÒÔصãÊÇÔÚ/aaaĿ¼Ï£¬¿É·ñ½«/optĿ¼ÏµÄËùÓÐÎļþcopyµ½/aaaĿ¼Ï£¬umount ÔÚ/aaaĿ¼ÏµĹÒÔص㣬½«/aaa¸ÄÃû/optĿ¼£¬ÔÙ½«ÔÀ ......