Linux¶à½ø³Ì¶àÏ̱߳à³Ì
´´½¨Ëĸö×Ó½ø³Ì£¨²¢ÁУ©£¬Ã¿¸ö×Ó½ø³Ì·Ö±ð´´½¨Á½¸ö×ÓỊ̈߳¬¿ÉÖ»Ìṩ¼òµ¥µÄ´òÓ¡Óï¾ä £¨ÒòΪ³õѧ£¬Ê²Ã´Ò²²»»á£©
´´½¨ºÃ½ø³ÌºóÊÇÖ±½ÓÓÃpthread_creat()´´½¨×ÓỊ̈߳¬»¹ÊÇÒªµ÷ÓÃexec,ÔÚ´´½¨×ÓÏß³Ì?
Ïß³Ìid pthread_tÀàÐ굀 ÓÃʲôÓï¾äÊä³ö ÎÒÓã¥d »á¾¯¸æ ¶øÇÒÊä³ö¸ºµÄ ºÜ³¤µÄÊýÖµ
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>
#include <sys/wait.h>
int * thread1 (void *arg)
{pthread_t newthid;
newthid=pthread_self();
printf("t1%d\n", newthid);
return NULL;
}
int * thread2 (void *arg)
{
printf ("t2 \n");
return NULL;
}
int * thread3 (void *arg)
{
printf ("t3 \n");
return NULL;
}
int * thread4 (void *arg)
{
printf ("t4\n");
return NULL;
}
int * thread5 (void *arg)
{
printf("t5\n");
return NULL;
}
int * thread6 (void *arg)
{
printf ("t6\n");
return NULL;
}
int * thread7 (void *arg)
{
printf("t7\n");
return NULL;
}
int * thread8 (void *arg)
{
printf ("t8\n");
return NULL;
Ïà¹ØÎÊ´ð£º
ÎÒĿǰÔÚ±¾µØµÄlinuxÉÏдÁËÒ»¸öswingµÄ½çÃæ£¬Ïëͨ¹ýÕâ¸ö½çÃæÀ´¿ØÖÆÆäËüµçÄÔµÄlinuxÖØÆô¡£
ÎÒÖªµÀÓÃRuntime.getRuntime().exec("shutdown -r");¿ÉÒÔ¿ØÖƱ¾»úLinuxÖØÆô£¬µ«ÊÇÔõô¿ØÖÆÔ¶³ÌµÄlinuxÖØÆôÄØ£¿ ......
Çë½Ì£º
ÔÚ LINUXϵͳÖеÄORACLEÔõôн¨±í¿Õ¼ä£¿
Ò»ÑùµÄÃüÁî°¡¡£Èç¹ûûÓÃomfµÄ»°£¬Äã¾ÍÖ¸¶¨Ï·¾¶ºÍÊý¾ÝÎļþÃû¾ÍÐÐÁË¡£
create tablespace xxx datafile '/u01/..../aaa.dbf' size 10m;
CREATE TA ......
ÎÒÓÃRPM±¨°²×°ÁËÒ»¸öÀϰ汾µÄJRE£¬ºóÀ´Ïëװа汾µÄ£¬
²»¹ý£¬ÎÒ°Ñ/usr/javaĿ¼ֱ½Ó¸øÉ¾ÁË£¬
ºóÔÙ°²×°µÄʱºò£¬×ÜÊÇÌáʾ°æ±¾³åÍ»£¬
¶øÇÒÎÒÓÃRPM°üÐ¶ÔØÊ±Ò²ÕÒ²»µ½ÎļþÁË¡£
ÎÒ¶ÔLINUX²»ÊìϤ£¬Ï£Íû¸ßÊÖ°ïæ¡£
http: ......
´úÂëÌ«¶à£¬²»ºÃÌù£¬
´óÖÂÉæ¼°µ½ÕâЩ£º
char *arg[MAXSIZE];
char *buffer[MAXSIZE];
.........
arg[k]=(char*)malloc(sizeof(char)*j);
strcpy(arg[k],buffer);
.................[color=#993300][/color]
µ ......