Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LINUX Ï̺߳¯Êý´óÈ«

LINUX Ï̺߳¯Êý´óÈ«
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬³ö´¦£ºhttp://blog.csdn.net/ShowMan/archive/2009/09/22/4580295.aspx
Ïß³Ì
´´½¨Ò»¸öȱʡµÄÏß³Ì
ȱʡµÄÏ̵߳ÄÊôÐÔ£º
l         ·Ç°ó¶¨
l         δ·ÖÀë
l         Ò»¸öȱʡ´óСµÄ¶ÑÕ»
l         ¾ßÓк͸¸Ïß³ÌÒ»ÑùµÄÓÅÏȼ¶
Óà phread_attr_init() ´´½¨Ò»¸öȱʡµÄÊôÐÔ¶ÔÏó£¬
ÓÃÊôÐÔ¶ÔÏó´´½¨Ò»¸öÏß³Ì pthread_create(3T)
int p thread_create ( pthread_t *tid, const pthread_attr_t *tattr, void *(*start_routine)(void*), void *arg );
#include<pthread.h>
pthread_attr_t  tattr;
pthread_t  tid;
extern  void  *start_routine(void *arg);
void  *arg;
int  ret;
/*default behavior*/
ret = pthread_create( &tid, NULL, start_routine, arg );
/*init with default attributes*/
ret = pthread_attr_init( &tattr );
/*default behavior specified*/
ret = pthread_create( &tid, &tattr, start_routine, arg );
tattr Öк¬Óгõʼ»¯Ïß³ÌËùÐèµÄÊôÐÔ£¬Öµ¸³Îª NULL ¼´È±Ê¡¡£ start_routine ÊÇÏß³ÌÈë¿Úº¯ÊýµÄÆðʼµØÖ·¡£µ± start_routine ·µ»Øʱ£¬ÏàÓ¦µÄÏ߳̾ͽáÊøÁË¡£Ï߳̽áÊøʱµÄÍ˳ö״ֵ̬ÊÇ start_routine º¯ÊýÓà phread_exit() º¯Êý·µ»ØµÄ·µ»ØÖµ¡£µ± pthread_create() º¯Êýµ÷Óóɹ¦Ê±£¬Ï̱߳êʶ·û±£´æÔÚ²ÎÊý tid Ö¸ÕëÖ¸ÏòÖС£
·µ»ØÖµ£¬ pthread_create() ³É¹¦ºó·µ»Ø 0 £¬
EAGAIN ³¬¹ýÁËij¸öÏÞÖÆ£¬Èç LWPs ¹ý¶à¡£
EINVAL   tattr Öµ·Ç·¨¡£
´´½¨×ÓÏß³Ìʱ£¬´«¸ø×ÓÏ̵߳ÄÊäÈë²ÎÊý×îºÃÊÇ malloc() ·µ»ØµÄÖ¸Õ루ÕâÑùµÄÖ¸ÕëÖ¸Ïò½ø³Ì¶ÑÖеĴ洢¿Õ¼ä£©»òÖ¸ÏòÈ«¾Ö±äÁ¿µÄÖ¸Õ룬¶ø²»ÒªÊÇÖ¸Ïò¾Ö²¿±äÁ¿µÄÖ¸Õë¡£ÒòΪµ±×ÓÏ̷߳ÃÎÊÊäÈë²ÎÊýʱ£¬´´½¨×ÓÏ̵߳ĺ¯Êý¿ÉÄÜÒѽáÊø£¬¾Ö²¿±äÁ¿Ò²¾Í²»´æÔÚÁË¡£
µÈ´ýÏ߳̽áÊø
       pthread_join(3T)
       int pthread_join( pthread_t tid, void **status );
       #include<pthread.h>
       pthread_t  tid;
       int 


Ïà¹ØÎĵµ£º

mysqlÔÚºìÆìlinuxÏÂÈ«³Ì°²×°ÅäÖÃÏé½â

1¡¢ÏÂÔØMySQLµÄ°²×°Îļþ
°²×°MySQLÐèÒªÏÂÃæÁ½¸öÎļþ£º
MySQL-server-5.0.46.i386.rpm¡¡¡¡¡¡
MySQL-client-5.0.46.i386.rpm

2¡¢°²×°MySQL
rpmÎļþÊÇRed Hat¹«Ë¾¿ª·¢µÄÈí¼þ°²×°°ü£¬rpm¿ÉÈÃLinuxÔÚ°²×°Èí¼þ°üʱÃâ³ýÐí¶à¸´ÔÓµÄÊÖÐø¡£¸ÃÃüÁîÔÚ°²×°Ê±³£ÓõIJÎÊýÊÇ
ivh
,ÆäÖÐi±íʾ½«°²×°Ö¸¶¨µÄrmpÈí¼þ°ü£¬V±í ......

linuxÏÂmysqlµÄʹÓÃ


Æô¶¯mysql:  /etc/rc.d/init.d/mysql start
ÐÞ¸ÄÃÜÂë: ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
ʹÓÃÃÜÂëµÇ¼:  mysql -u root -p
ÏÔʾÊý¾Ý¿â:  show databases;
Ñ¡ÔñÊý¾Ý¿â:  use Êý¾Ý¿âÃû;
ÏÔʾ±í:  show tables;
ÏÔʾ±í½á¹¹:  descibe ±íÃû;
Ô¶³ÌµÇ¼mysqlÐèÒª¿ªÆôÈ ......

ÓÃLinuxÏÂPerl½Å±¾Á¬½ÓSQLServer

×¼±¸¹¤×÷:
¡¡¡¡Óõ½µÄperl À©Õ¹×é¼þ(modules)ÔÚÉÏƪÌù³ö.( win32::odbc Ä£¿é
)ÏÂÔØ×é¼þºó°´ÕÕReadmeÎļþ°²×°µ¹ÏìӦĿ¼.ÅäÖúÃÏàÓ¦µÄodbcÊý¾ÝÔ´.
¡¡¡¡
¡¡¡¡³ÌÐòʵÏÖ:
¡¡¡¡Ê¹ÓÃ
¡¡¡¡use
Win32::ODBC;
¡¡¡¡
¡¡¡¡Óï¾ä°üº¬Ó¦Ê¹ÓõÄÄ£¿éÊÇwin32::odbc,д³öÊý¾Ý¿â
Á¬½Ó×Ö·û´®
¡¡¡¡
¡¡¡¡$DSN = "DSN =
My DSN ......

½â¶Álinux¶Ôstring.hº¯ÊýµÄʵÏÖ

/*
file:string.h
#ifndef _LINUX_STRING_H_
#define _LINUX_STRING_H_
/* We don't want strings.h stuff being user by user stuff by accident */
#ifdef __KERNEL__
#include <linux/types.h> /* for size_t */
#include <linux/stddef.h> /* for NULL */
#include <linux/compiler.h&g ......

ÔÚlinuxÏ°²×°ºÍÅäÖÃApache+PHP

£¨1£© °²×°ºÍÅäÖÃApache
      ÔÚÈçÏÂÒ³ÃæÏÂÔØapacheµÄfor Linux µÄÔ´Âë°ühttp://www.apache.org/dist/httpd/
¡¡¡¡´æÖÁ/home/xxĿ¼£¬xxÊÇ×Ô½¨Îļþ¼Ð£¬ÎÒ½¨ÁËÒ»¸öwhyµÄÎļþ¼Ð¡£
¡¡¡¡ÃüÁîÁÐ±í£º¡¡¡¡
              & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ