hook bind/listen in lib_fiber

This commit is contained in:
zhengshuxin 2016-11-18 22:24:41 +08:00
parent 2b282d9f66
commit 2c3b988fcf
3 changed files with 6 additions and 2 deletions

View File

@ -98,7 +98,6 @@ int socketpair(int domain, int type, int protocol, int sv[2])
#define FAST_ACCEPT
#ifndef FAST_ACCEPT
int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
{
if (__sys_bind(sockfd, addr, addrlen) == 0)
@ -123,7 +122,6 @@ int listen(int sockfd, int backlog)
fiber_save_errno();
return -1;
}
#endif
int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
{

View File

@ -0,0 +1,3 @@
#!/bin/sh
./mysql -c 10 -n 100 -f /home/zsx/work/oschina/svn.acl/resource/mysql-connector-c-6.1.6-src/libmysql/libmysqlclient.so \
-s /var/lib/mysql/mysql.sock -o add -u root

View File

@ -0,0 +1,3 @@
#!/bin/sh
./mysql -c 10 -n 100 -f /home/zsx/work/oschina/svn.acl/resource/mysql-connector-c-6.1.6-src/libmysql/libmysqlclient.so \
-s /var/lib/mysql/mysql.sock -o get -u root