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;
Ïà¹ØÎÊ´ð£º
СµÜ×î½üÐèÒªÒ»¸öÓÃsocket»ñÈ¡htmlÎĵµµÄ´úÂ룬µ«ÊÇÀÏÊDz»ÄÜ»ñÈ¡ÍêÕûµÄhtmlÔ´Âë¡£ÔÒò²»Ã÷£¬Íû¸ßÊÖÖ¸µã£¡
C/C++ code:
char *Http_GET(char *host,int port,char *data) //·¢ËÍGETÇëÇó
{
char response[2 ......
ÎÒÃÇÁ¥ÊôÖпÆÔº¼ÆËãËùÍøÂçÖØµãʵÑéÊÒ(http://www.ict.ac.cn/survey/channel/detail443.asp)»ù´¡ÉèÊ©¿ÎÌâ×é.
ÏÖÒòÏîÄ¿ºÍÒµÎñÍØÕ¹µÄÐèÒª,ÌØÐèÒªÕÐÆ¸ÓëÏîÄ¿Ïà¹ØµÄÍøÂçÓ¦Óù¤³Ìʦ1-2Ãû¡£
¾ßÌåÒªÇóÈçÏ¡£ÓÐÒâÕß ......
¸÷λ´óϺ£¬ÎÒÕýÔÚѧϰLinux£¬¿ÉÊÇLinuxͼÐνçÃæºÍÃüÁîÐÐÖ®¼äÇл»Óöµ½À§ÄÑ£¬ÔÚÃüÁîÐÐÏÂÊäÈëstartx£¬²»ÊǽøÈëͼÐνçÃæ
¶øÊdzöÏÖ
ÇëÎʸ÷룬ÕâÊÇΪʲô£¿ ¶øÇÒ°´Ctrl+Alt+F7£¬Ò²²»ÄÜÃüÁîÐнøÈëͼÐνçÃæ¡£
¼±¼±¼±
......
Á½¸öÎļþ1.PC£¬1.inc
1.PCÓвÙ×÷oracleÊý¾Ý¿âµÄ ,1.incÒ²ÓвÙ×÷oracleÊý¾Ý¿â
ÔÚÆäËûÊý¾ÝÖÐÈçinformix ÖÐ$include 1.inc¾Í¿ÉÒÔʹÓÃÁË
ÔÚORACLEÊý¾Ý¿âÖØ $include 1.inc²»¿ÉÓà EXEC SQL include 1.incÒ²²»¿É ......
´úÂëÌ«¶à£¬²»ºÃÌù£¬
´óÖÂÉæ¼°µ½ÕâЩ£º
char *arg[MAXSIZE];
char *buffer[MAXSIZE];
.........
arg[k]=(char*)malloc(sizeof(char)*j);
strcpy(arg[k],buffer);
.................[color=#993300][/color]
µ ......