linux ÏÂc ³ÌÐò ¶Î´íÎó ·ÖÎö
linux ÏÂc ³ÌÐò ¶Î´íÎó ·ÖÎö
(2008-12-31 16:50:57)
var $tag='it';
var $tag_code='2cec03ae0a5b0d224bb35c9b79dd54c7';
±êÇ©£ºit
·ÖÀࣺC/C++
fopen("/var/spool/cron/tmp","w+");
/////////////////////////////////////////
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
int ret=-1;
printf("***************************************
delPolicy
***************************************************\n");
FILE *f;
f=fopen("var/spool/cron/tmp","w");
if(f==NULL)
{
printf("open tmp failed!\n");
fclose(f);
return -1;
}
printf("open two files
successfully!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
fclose(f);
ret=0;
printf("***************************************
delPolicy
***************************************************\n");
return ret;
}
³öÏֶδíÎó:
ÔÒò:1:"/var/spool/cron/tmp"´íд³É"var/spool/cron/tmp"
2:ÎļþÃû²»ÄÜΪtmp¹Ø¼ü×Ö,¿ÉΪmytmp
²úÉú¶Î´íÎó¾ÍÊÇ·ÃÎÊÁË´íÎóµÄÄÚ´æ¶Î£¬Ò»°ãÊÇÄãûÓÐȨÏÞ£¬»òÕ߸ù±¾¾Í²»´æÔÚ¶ÔÓ¦µÄÎïÀíÄÚ´æ,ÓÈÆä³£¼ûµÄÊÇ·ÃÎÊ0µØÖ·.
Ò»°ãÀ´Ëµ,¶Î´íÎó¾ÍÊÇÖ¸·ÃÎʵÄÄڴ泬³öÁËϵͳËù¸øÕâ¸ö³ÌÐòµÄÄÚ´æ¿Õ¼ä£¬Í¨³£Õâ¸öÖµÊÇÓÉgdtrÀ´±£´æµÄ£¬ËüÊÇÒ»¸ö48λµÄ¼Ä´æÆ÷£¬
ÆäÖеÄ32λÊDZ£´æÓÉËüÖ¸ÏòµÄgdt±í£¬ºó13λ±£´æÏàÓ¦ÓÚgdtµÄϱ꣬×îºó3λ°üÀ¨Á˳ÌÐòÊÇ·ñÔÚÄÚ´æÖÐÒÔ¼°³ÌÐòµÄÔÚcpuÖеÄÔËÐм¶±ð,
Ö¸ÏòµÄgdtÊÇÓÉÒÔ64λΪһ¸öµ¥Î»µÄ±í£¬ÔÚÕâÕűíÖоͱ£´æ×ųÌÐòÔËÐеĴúÂë¶ÎÒÔ¼°Êý¾Ý¶ÎµÄÆðʼµØÖ·,ÒÔ¼°Óë´ËÏàÓ¦µÄ¶ÎÏÞºÍÒ³Ãæ½»»»,
»¹ÓгÌÐòÔËÐм¶±ð»¹ÓÐÄÚ´æÁ£¶ÈµÈµÈµÄÐÅÏ¢¡£Ò»µ©Ò»¸ö³ÌÐò·¢ÉúÁËÔ½½ç·ÃÎÊ£¬cpu¾Í»á²úÉúÏàÓ¦µÄÒì³£±£»¤£¬ÓÚÊÇsegmentation
fault¾Í³öÏÖÁË.
ÔÚ±à³ÌÖÐÒÔϼ¸Àà×ö·¨ÈÝÒ×µ¼Ö¶δíÎó,»ù±¾ÊÇÊÇ´íÎóµØÊ¹ÓÃÖ¸ÕëÒýÆðµÄ
1)·ÃÎÊϵͳÊý¾ÝÇø£¬ÓÈÆäÊÇÍù
ϵͳ±£»¤µÄÄÚ´æµØÖ·Ð´Êý¾Ý×î³£¼û¾ÍÊǸøÒ»¸öÖ¸ÕëÒÔ0µØÖ·
2)ÄÚ´æÔ½½ç(Êý×éÔ½½ç£¬±äÁ¿ÀàÐͲ»Ò»ÖµÈ) ·ÃÎÊ
Ïà¹ØÎĵµ£º
Ïà¹ØÁ´½Ó£º
http://blog.csdn.net/dongliqiang2006/archive/2009/09/05/4523563.aspx
×Ö·ûÉ豸
1£¬×Ö·ûÉ豸²ã
ÔÚLinuxÖÐÊÇ×÷Ϊһ¸öÎļþÀ´³öÏֵģ¬ËùÓжÔ×Ö·ûÉ豸µÄ²Ù×÷¶¼ÊÇͨ¹ýfile_operations½Ó¿ÚÀ´½øÐеģº
struct cdev {
struct kobject kobj;
struct module *owner;
const struct file_operations *op ......
vi±à¼Æ÷ÊÇËùÓÐUnix¼°Linuxϵͳϱê×¼µÄ±à¼Æ÷
£¬
ËüµÄÇ¿´ó²»Ñ·É«ÓÚÈκÎ×îеÄÎı¾±à¼Æ÷£¬ÕâÀïÖ»ÊǼòµ¥µØ½éÉÜÒ»ÏÂËüµÄÓ÷¨ºÍһС²¿·ÖÖ¸Áî¡£ÓÉÓÚ¶ÔUnix¼°LinuxϵͳµÄÈκΰ汾£¬vi±à¼Æ÷ÊÇÍêÈ«Ïà
ͬµÄ£¬Òò´ËÄú¿ÉÒÔÔÚÆäËûÈκνéÉÜviµÄµØ·½½øÒ»²½Á˽âËü¡£ViÒ²ÊÇLinuxÖÐ×î»ù±¾µÄÎı¾±à¼Æ÷£¬Ñ§»áËüºó£¬Äú½«ÔÚLinuxµÄÊÀ½çÀﳩ ......
±¾È˲Ù×÷ϵͳ»·¾³ÊÇUBUNTU 8.04 ÔÚ³¬¼¶È¨ÏÞϰ²×°³É¹¦,½ö¹©²Î¿¼(ǰÌáµÃ°²×°Linux °æ±¾JDK)
»ù±¾½éÉÜ:
Tomcat
ÊÇÒ»¸öÃâ·ÑµÄ¿ªÔ´µÄSerlvetÈÝÆ÷£¬ËüÊÇApache»ù½ð»áµÄJakartaÏîÄ¿ÖеÄÒ»¸öºËÐÄÏîÄ¿£¬ÓÉApache£¬SunºÍÆäËüһЩ¹«Ë¾¼°¸öÈ˹²Í¬¿ª·¢¶ø³É¡£ÓÉÓÚÓÐÁËSunµÄ²ÎÓëºÍÖ§³Ö£¬×îеÄServletºÍJsp¹æ·¶×ÜÄÜÔÚTomcatÖ ......
ת×Ô:http://blog.163.com/haizai219@126/blog/static/44412555200962751636461/
inuxÏÂJDKºÍTomcatµÄ°²×°
Tomcat
2009-07-27 17:16:36
ÔĶÁ503
ÆÀÂÛ0
×ֺţº´ó
ÖÐ
С
1.
²Î¿¼£º
l   ......
±¾ÎÄÀ´×ÔChinaUnix²©¿Í£¬Èç¹û²é¿´ÔÎÄÇëµã£ºhttp://blog.chinaunix.net/u1/53989/showart_1812426.html
1.ʲôÊÇ¿â
ÔÚwindowsƽ̨ºÍlinuxƽ̨϶¼´óÁ¿´æÔÚ×ſ⡣
±¾ÖÊÉÏÀ´Ëµ¿âÊÇÒ»ÖÖ¿ÉÖ´ÐдúÂëµÄ¶þ½øÖÆÐÎʽ£¬¿ÉÒÔ±»²Ù×÷ÏµÍ³ÔØÈëÄÚ´æÖ´ÐС£
ÓÉÓÚwindowsºÍlinuxµÄ±¾Öʲ»Í¬£¬Òò´Ë¶þÕß¿âµÄ¶þ½øÖÆÊDz»¼æÈݵġ£
±¾ÎĽöÏÞÓÚ½ ......